mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2025-07-01 15:10:48 -07:00
Prevent Display Sleep on Windows while running a game (#1850)
Co-authored-by: EliEron <example@example.com>
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user