remove requirement of shift-holding to doubleclick fullscreen toggle.. unless a zapper game is running.
This commit is contained in:
parent
1895e15ea5
commit
8ba683f6bd
|
@ -822,19 +822,20 @@ namespace BizHawk.Client.EmuHawk
|
|||
}
|
||||
}
|
||||
|
||||
[System.Runtime.InteropServices.DllImport("user32.dll")]
|
||||
static extern int SetWindowLong(IntPtr hWnd, int nIndex, int dwNewLong);
|
||||
|
||||
[System.Runtime.InteropServices.DllImport("user32.dll", SetLastError = true)]
|
||||
static extern int GetWindowLong(IntPtr hWnd, int nIndex);
|
||||
|
||||
public bool IsInFullscreen
|
||||
{
|
||||
get { return _inFullscreen; }
|
||||
}
|
||||
|
||||
public void ToggleFullscreen()
|
||||
public void ToggleFullscreen(bool allowSuppress=false)
|
||||
{
|
||||
//prohibit this operation if the current controls include LMouse
|
||||
if (allowSuppress)
|
||||
{
|
||||
if (Global.ActiveController.HasBinding("WMouse L"))
|
||||
return;
|
||||
}
|
||||
|
||||
if (_inFullscreen == false)
|
||||
{
|
||||
SuspendLayout();
|
||||
|
|
|
@ -53,9 +53,11 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
private void HandleFullscreenToggle(object sender, MouseEventArgs e)
|
||||
{
|
||||
if (e.Button == MouseButtons.Left && Control.ModifierKeys == Keys.Shift)
|
||||
if (e.Button == MouseButtons.Left)
|
||||
{
|
||||
GlobalWin.MainForm.ToggleFullscreen();
|
||||
//allow suppression of the toggle.. but if shift is pressed, always do the toggle
|
||||
bool allowSuppress = Control.ModifierKeys != Keys.Shift;
|
||||
GlobalWin.MainForm.ToggleFullscreen(allowSuppress);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue