Prevent Display Sleep on Windows while running a game (#1850)
Co-authored-by: EliEron <example@example.com>
This commit is contained in:
parent
ddf1105bcb
commit
ad491b5570
3 changed files with 40 additions and 1 deletions
|
@ -554,6 +554,8 @@ namespace Ryujinx.Ui
|
|||
_windowsMultimediaTimerResolution = new WindowsMultimediaTimerResolution(1);
|
||||
}
|
||||
|
||||
DisplaySleep.Prevent();
|
||||
|
||||
GlRendererWidget = new GlRenderer(_emulationContext, ConfigurationState.Instance.Logger.GraphicsDebugLevel);
|
||||
|
||||
Application.Invoke(delegate
|
||||
|
@ -604,6 +606,7 @@ namespace Ryujinx.Ui
|
|||
|
||||
_windowsMultimediaTimerResolution?.Dispose();
|
||||
_windowsMultimediaTimerResolution = null;
|
||||
DisplaySleep.Restore();
|
||||
|
||||
_viewBox.Remove(GlRendererWidget);
|
||||
_viewBox.Add(_gameTableWindow);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue