mirror of
https://github.com/libretro/Mesen.git
synced 2025-02-15 14:17:43 +00:00
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:
parent
828435e165
commit
c107bd643d
@ -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);
|
||||
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user