GLRenderer: Change between docked and handheld mode using a keybinding (#1685)

* GLRenderer: Change between docked and handheld mode using a keybinding

* nit
This commit is contained in:
Sera 2020-11-19 00:15:44 +01:00 committed by GitHub
parent 7f536b5a15
commit 41ab43151b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -42,6 +42,7 @@ namespace Ryujinx.Ui
private bool _mousePressed; private bool _mousePressed;
private bool _toggleFullscreen; private bool _toggleFullscreen;
private bool _toggleDockedMode;
private readonly long _ticksPerFrame; private readonly long _ticksPerFrame;
@ -163,6 +164,19 @@ namespace Ryujinx.Ui
} }
_toggleFullscreen = toggleFullscreen; _toggleFullscreen = toggleFullscreen;
bool toggleDockedMode = keyboard.IsKeyDown(OpenTK.Input.Key.F9);
if (toggleDockedMode != _toggleDockedMode)
{
if (toggleDockedMode)
{
ConfigurationState.Instance.System.EnableDockedMode.Value =
!ConfigurationState.Instance.System.EnableDockedMode.Value;
}
}
_toggleDockedMode = toggleDockedMode;
} }
private void GLRenderer_Initialized(object sender, EventArgs e) private void GLRenderer_Initialized(object sender, EventArgs e)