Skip to content

Commit

Permalink
allow user to suppress doubleclick-to-toggle-fullscreen behaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
zeromus committed Sep 8, 2015
1 parent 43f86b5 commit 21da5ad
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 4 deletions.
1 change: 1 addition & 0 deletions BizHawk.Client.Common/config/Config.cs
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,7 @@ public const int
public bool DispChrome_StatusBarFullscreen = false;
public bool DispChrome_MenuFullscreen = false;
public bool DispChrome_Fullscreen_AutohideMouse = true;
public bool DispChrome_AllowDoubleClickFullscreen = true;

public EDispManagerAR DispManagerAR = EDispManagerAR.System;
public int DispCustomUserARWidth = 1;
Expand Down
4 changes: 3 additions & 1 deletion BizHawk.Client.EmuHawk/BizHawk.Client.EmuHawk.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,9 @@
<Compile Include="CustomControls\ViewportPanel.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="CustomControls\VirtualListView.cs" />
<Compile Include="CustomControls\VirtualListView.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="CustomControls\Win32.cs" />
<Compile Include="DisplayManager\DisplayManager.cs" />
<Compile Include="DisplayManager\DisplaySurface.cs" />
Expand Down
5 changes: 4 additions & 1 deletion BizHawk.Client.EmuHawk/PresentationPanel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,10 @@ private void HandleFullscreenToggle(object sender, MouseEventArgs e)
{
//allow suppression of the toggle.. but if shift is pressed, always do the toggle
bool allowSuppress = Control.ModifierKeys != Keys.Shift;
GlobalWin.MainForm.ToggleFullscreen(allowSuppress);
if (Global.Config.DispChrome_AllowDoubleClickFullscreen || !allowSuppress)
{
GlobalWin.MainForm.ToggleFullscreen(allowSuppress);
}
}
}

Expand Down
18 changes: 16 additions & 2 deletions BizHawk.Client.EmuHawk/config/DisplayConfigLite.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions BizHawk.Client.EmuHawk/config/DisplayConfigLite.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ public DisplayConfigLite()
cbFSAutohideMouse.Checked = Global.Config.DispChrome_Fullscreen_AutohideMouse;
SyncTrackbar();

cbAllowDoubleclickFullscreen.Checked = Global.Config.DispChrome_AllowDoubleClickFullscreen;

nudPrescale.Value = Global.Config.DispPrescale;

// null emulator config hack
Expand Down Expand Up @@ -113,6 +115,7 @@ private void btnOk_Click(object sender, EventArgs e)
Global.Config.DispChrome_MenuFullscreen = cbMenuFullscreen.Checked;
Global.Config.DispChrome_FrameWindowed = trackbarFrameSizeWindowed.Value;
Global.Config.DispChrome_Fullscreen_AutohideMouse = cbFSAutohideMouse.Checked;
Global.Config.DispChrome_AllowDoubleClickFullscreen = cbAllowDoubleclickFullscreen.Checked;

if (rbDisplayFull.Checked) Global.Config.DispSpeedupFeatures = 2;
if (rbDisplayMinimal.Checked) Global.Config.DispSpeedupFeatures = 1;
Expand Down

0 comments on commit 21da5ad

Please sign in to comment.