From 41ab43151ba3448195cd8b5c2da295c9d96edff8 Mon Sep 17 00:00:00 2001 From: Sera <62521228+SeraUQ@users.noreply.github.com> Date: Thu, 19 Nov 2020 00:15:44 +0100 Subject: [PATCH] GLRenderer: Change between docked and handheld mode using a keybinding (#1685) * GLRenderer: Change between docked and handheld mode using a keybinding * nit --- Ryujinx/Ui/GLRenderer.cs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Ryujinx/Ui/GLRenderer.cs b/Ryujinx/Ui/GLRenderer.cs index 60012519b6..10525a4be6 100644 --- a/Ryujinx/Ui/GLRenderer.cs +++ b/Ryujinx/Ui/GLRenderer.cs @@ -42,6 +42,7 @@ namespace Ryujinx.Ui private bool _mousePressed; private bool _toggleFullscreen; + private bool _toggleDockedMode; private readonly long _ticksPerFrame; @@ -163,6 +164,19 @@ namespace Ryujinx.Ui } _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)