Debugger: Lua - Disable double-click to fullscreen when a Lua script is loaded (to prevent switching mode while using a script that uses the mouse buttons)

This commit is contained in:
Sour 2018-04-15 10:52:38 -04:00
parent 828435e165
commit c107bd643d
2 changed files with 4 additions and 3 deletions

View file

@ -11,6 +11,8 @@ namespace Mesen.GUI.Debugger
{
private static HashSet<Form> _openedWindows = new HashSet<Form>();
public static bool ScriptWindowOpened { get { return _openedWindows.Any(wnd => wnd is frmScript); } }
public static void OpenDebugWindow(DebugWindow window)
{
Form existingWindow = GetExistingSingleInstanceWindow(window);

View file

@ -805,7 +805,6 @@ namespace Mesen.GUI.Forms
private void ToggleFullscreen()
{
SetFullscreenState(!_fullscreenMode);
mnuFullscreen.Checked = _fullscreenMode;
}
private void ToggleMaxSpeed()
@ -1163,9 +1162,9 @@ namespace Mesen.GUI.Forms
private void ctrlRenderer_DoubleClick(object sender, EventArgs e)
{
if(!CursorManager.NeedMouseIcon && !CursorManager.AllowMouseCapture) {
if(!CursorManager.NeedMouseIcon && !CursorManager.AllowMouseCapture && !DebugWindowManager.ScriptWindowOpened) {
//Disable double clicking (used to switch to fullscreen mode) when using a mouse-controlled device
SetFullscreenState(!_fullscreenMode);
ToggleFullscreen();
}
}