mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-08-01 02:30:08 -06: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