private void OnDockedModeChange(object sender, ReactiveEventArgs <bool> e) { if (e.NewValue != State.DockedMode) { State.DockedMode = e.NewValue; AppletState.EnqueueMessage(MessageInfo.OperationModeChanged); AppletState.EnqueueMessage(MessageInfo.PerformanceModeChanged); SignalDisplayResolutionChange(); } }
private void OnDockedModeChange(object sender, ReactiveEventArgs <bool> e) { if (e.NewValue != State.DockedMode) { State.DockedMode = e.NewValue; AppletState.EnqueueMessage(MessageInfo.OperationModeChanged); AppletState.EnqueueMessage(MessageInfo.PerformanceModeChanged); SignalDisplayResolutionChange(); // Reconfigure controllers Device.Hid.RefreshInputConfig(ConfigurationState.Instance.Hid.InputConfig.Value); } }
protected virtual void Dispose(bool Disposing) { if (Disposing && !Disposed) { //If there is still some thread running, disposing the objects is not //safe as the thread may try to access those resources. Instead, we set //the flag to have the Process disposed when all threads finishes. //Note: This may not happen if the guest code gets stuck on a infinite loop. if (TlsSlots.Count > 0) { ShouldDispose = true; Ns.Log.PrintInfo(LogClass.Loader, $"Process {ProcessId} waiting all threads terminate..."); return; } Disposed = true; foreach (object Obj in HandleTable.Clear()) { if (Obj is KSession Session) { Session.Dispose(); } } if (NeedsHbAbi && Executables.Count > 0 && Executables[0].FilePath.EndsWith(Homebrew.TemporaryNroSuffix)) { File.Delete(Executables[0].FilePath); } INvDrvServices.UnloadProcess(this); AppletState.Dispose(); SvcHandler.Dispose(); Memory.Dispose(); Ns.Log.PrintInfo(LogClass.Loader, $"Process {ProcessId} exiting..."); } }
public void ReturnFocus() { AppletState.SetFocus(true); }