add fullscreen auto-hide mouse cursor

This commit is contained in:
zeromus 2015-07-24 15:59:53 -05:00
parent 072aeb93d5
commit 63197300b4
14 changed files with 245 additions and 153 deletions

View File

@ -265,6 +265,7 @@ namespace BizHawk.Client.Common
public bool DispChrome_MenuWindowed = true;
public bool DispChrome_StatusBarFullscreen = false;
public bool DispChrome_MenuFullscreen = false;
public bool DispChrome_Fullscreen_AutohideMouse = true;
public EDispManagerAR DispManagerAR = EDispManagerAR.System;
public int DispCustomUserARWidth = 1;

View File

@ -1793,9 +1793,6 @@
<None Include="images\tastudio\ts_h_arrow_green_blue.png" />
<None Include="images\tastudio\ts_h_arrow_green.png" />
<None Include="images\tastudio\ts_h_arrow_blue.png" />
<None Include="images\tastudio\te_green_blue_arrow.bmp" />
<None Include="images\tastudio\te_green_arrow.bmp" />
<None Include="images\tastudio\te_arrow.bmp" />
<None Include="images\noconnect_16x16.png" />
<None Include="images\snes9x.png" />
<None Include="images\YellowUp.png" />
@ -1809,7 +1806,6 @@
<None Include="images\meteor.png" />
<None Include="images\yabause.png" />
<None Include="images\QuickNes.png" />
<None Include="images\QuickNES_128.ico" />
<None Include="images\sms-icon.png" />
<None Include="images\pcb.png" />
<None Include="images\tvIcon.png" />
@ -1926,6 +1922,7 @@
<None Include="images\add.png" />
<None Include="images\HawkInLove.png" />
<None Include="images\ControllerImages\AppleIIKeyboard.png" />
<None Include="images\BlankCursor.cur" />
<Content Include="images\logo.ico" />
<None Include="images\Paste.png" />
<None Include="images\reboot.png" />

View File

@ -280,6 +280,7 @@
this.PSXControllerSettingsMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.PSXOptionsMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.PSXDiscControlsMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.PSXHashDiscsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.SNESSubMenu = new System.Windows.Forms.ToolStripMenuItem();
this.SNESDisplayMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.SnesBg1MenuItem = new System.Windows.Forms.ToolStripMenuItem();
@ -396,7 +397,7 @@
this.ClearSRAMContextMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.ShowMenuContextMenuSeparator = new System.Windows.Forms.ToolStripSeparator();
this.ShowMenuContextMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.PSXHashDiscsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.timerMouseIdle = new System.Windows.Forms.Timer(this.components);
this.MainformMenu.SuspendLayout();
this.MainStatusBar.SuspendLayout();
this.MainFormContextMenu.SuspendLayout();
@ -431,7 +432,7 @@
this.MainformMenu.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.Flow;
this.MainformMenu.Location = new System.Drawing.Point(0, 0);
this.MainformMenu.Name = "MainformMenu";
this.MainformMenu.Size = new System.Drawing.Size(470, 57);
this.MainformMenu.Size = new System.Drawing.Size(470, 55);
this.MainformMenu.TabIndex = 0;
this.MainformMenu.Text = "menuStrip1";
this.MainformMenu.MenuActivate += new System.EventHandler(this.MainformMenu_MenuActivate);
@ -2524,6 +2525,13 @@
this.PSXDiscControlsMenuItem.Text = "&Disc Controls";
this.PSXDiscControlsMenuItem.Click += new System.EventHandler(this.PSXDiscControlsMenuItem_Click);
//
// PSXHashDiscsToolStripMenuItem
//
this.PSXHashDiscsToolStripMenuItem.Name = "PSXHashDiscsToolStripMenuItem";
this.PSXHashDiscsToolStripMenuItem.Size = new System.Drawing.Size(163, 22);
this.PSXHashDiscsToolStripMenuItem.Text = "&Hash Discs";
this.PSXHashDiscsToolStripMenuItem.Click += new System.EventHandler(this.PSXHashDiscsToolStripMenuItem_Click);
//
// SNESSubMenu
//
this.SNESSubMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
@ -3499,12 +3507,11 @@
this.ShowMenuContextMenuItem.Text = "Show Menu";
this.ShowMenuContextMenuItem.Click += new System.EventHandler(this.ShowMenuContextMenuItem_Click);
//
// PSXHashDiscsToolStripMenuItem
// timerMouseIdle
//
this.PSXHashDiscsToolStripMenuItem.Name = "PSXHashDiscsToolStripMenuItem";
this.PSXHashDiscsToolStripMenuItem.Size = new System.Drawing.Size(163, 22);
this.PSXHashDiscsToolStripMenuItem.Text = "&Hash Discs";
this.PSXHashDiscsToolStripMenuItem.Click += new System.EventHandler(this.PSXHashDiscsToolStripMenuItem_Click);
this.timerMouseIdle.Enabled = true;
this.timerMouseIdle.Interval = 2000;
this.timerMouseIdle.Tick += new System.EventHandler(this.timerMouseIdle_Tick);
//
// MainForm
//
@ -3522,6 +3529,7 @@
this.Shown += new System.EventHandler(this.MainForm_Shown);
this.Enter += new System.EventHandler(this.MainForm_Enter);
this.MouseClick += new System.Windows.Forms.MouseEventHandler(this.MainForm_MouseClick);
this.MouseMove += new System.Windows.Forms.MouseEventHandler(this.MainForm_MouseMove);
this.Resize += new System.EventHandler(this.MainForm_Resize);
this.MainformMenu.ResumeLayout(false);
this.MainformMenu.PerformLayout();
@ -3913,6 +3921,7 @@
private System.Windows.Forms.ToolStripMenuItem AutoHawkMenuItem;
private System.Windows.Forms.ToolStripMenuItem settingsToolStripMenuItem1;
private System.Windows.Forms.ToolStripMenuItem PSXHashDiscsToolStripMenuItem;
private System.Windows.Forms.Timer timerMouseIdle;
}
}

View File

@ -1131,6 +1131,11 @@ namespace BizHawk.Client.EmuHawk
AutoHawkMenuItem.Visible = VersionInfo.DeveloperBuild;
}
private void AutoHawkMenuItem_Click(object sender, EventArgs e)
{
GlobalWin.Tools.Load<AutoHawk>();
}
private void ToolBoxMenuItem_Click(object sender, EventArgs e)
{
GlobalWin.Tools.Load<ToolBox>();
@ -1195,6 +1200,18 @@ namespace BizHawk.Client.EmuHawk
#region NES
private void quickNESToolStripMenuItem_Click(object sender, EventArgs e)
{
Global.Config.NES_InQuickNES = true;
FlagNeedsReboot();
}
private void nesHawkToolStripMenuItem_Click(object sender, EventArgs e)
{
Global.Config.NES_InQuickNES = false;
FlagNeedsReboot();
}
private void NESSubMenu_DropDownOpened(object sender, EventArgs e)
{
FDSControlsMenuItem.Enabled = Global.Emulator.BoardName == "FDS";
@ -1658,10 +1675,39 @@ namespace BizHawk.Client.EmuHawk
GlobalWin.Tools.Load<GBAGPUView>();
}
private void GBAmGBAMenuItem_Click(object sender, EventArgs e)
{
Global.Config.GBA_UsemGBA = true;
FlagNeedsReboot();
}
private void GBAVBANextMenuItem_Click(object sender, EventArgs e)
{
Global.Config.GBA_UsemGBA = false;
FlagNeedsReboot();
}
private void GBACoreSelectionSubMenu_DropDownOpened(object sender, EventArgs e)
{
GBAmGBAMenuItem.Checked = Global.Config.GBA_UsemGBA == true;
GBAVBANextMenuItem.Checked = Global.Config.GBA_UsemGBA == false;
}
private void gBAWithMGBAToolStripMenuItem_Click(object sender, EventArgs e)
{
Global.Config.GBA_UsemGBA ^= true;
FlagNeedsReboot();
}
#endregion
#region PSX
private void PSXHashDiscsToolStripMenuItem_Click(object sender, EventArgs e)
{
new PSXHashDiscs().ShowDialog();
}
private void PSXSubMenu_DropDownOpened(object sender, EventArgs e)
{
PSXControllerSettingsMenuItem.Enabled = !Global.MovieSession.Movie.IsActive;
@ -1944,6 +1990,10 @@ namespace BizHawk.Client.EmuHawk
#region Apple II
private void settingsToolStripMenuItem1_Click_1(object sender, EventArgs e)
{
GenericCoreConfig.DoDialog(this, "Apple II Settings");
}
private void AppleSubMenu_DropDownOpened(object sender, EventArgs e)
{
@ -2365,13 +2415,26 @@ namespace BizHawk.Client.EmuHawk
}
}
private void timerMouseIdle_Tick(object sender, EventArgs e)
{
if (_inFullscreen && Global.Config.DispChrome_Fullscreen_AutohideMouse)
AutohideCursor(true);
}
private void MainForm_Enter(object sender, EventArgs e)
{
GlobalWin.DisplayManager.NeedsToPaint = true;
AutohideCursor(false);
}
public void MainForm_MouseMove(object sender, MouseEventArgs e)
{
AutohideCursor(false);
}
public void MainForm_MouseClick(object sender, MouseEventArgs e)
{
AutohideCursor(false);
if (Global.Config.ShowContextMenu && e.Button == MouseButtons.Right)
{
MainFormContextMenu.Show(

View File

@ -919,8 +919,6 @@ namespace BizHawk.Client.EmuHawk
public void SynchChrome()
{
//PANTS
if (_inFullscreen)
{
//TODO - maybe apply a hack tracked during fullscreen here to override it
@ -940,11 +938,12 @@ namespace BizHawk.Client.EmuHawk
else if (Global.Config.DispChrome_FrameWindowed == 2)
FormBorderStyle = System.Windows.Forms.FormBorderStyle.Sizable;
}
}
public void ToggleFullscreen(bool allowSuppress=false)
{
AutohideCursor(false);
//prohibit this operation if the current controls include LMouse
if (allowSuppress)
{
@ -1228,6 +1227,8 @@ namespace BizHawk.Client.EmuHawk
private bool _wasPaused;
private bool _didMenuPause;
private Cursor _blankCursor;
private bool _cursorHidden;
private bool _inFullscreen;
private Point _windowedLocation;
@ -1732,6 +1733,27 @@ namespace BizHawk.Client.EmuHawk
}
}
void AutohideCursor(bool hide)
{
if (hide && !_cursorHidden)
{
if (_blankCursor == null)
{
var ms = new System.IO.MemoryStream(BizHawk.Client.EmuHawk.Properties.Resources.BlankCursor);
_blankCursor = new Cursor(ms);
}
PresentationPanel.Control.Cursor = _blankCursor;
_cursorHidden = true;
}
else if (!hide && _cursorHidden)
{
PresentationPanel.Control.Cursor = Cursors.Default;
timerMouseIdle.Stop();
timerMouseIdle.Start();
_cursorHidden = false;
}
}
private static unsafe BitmapBuffer MakeScreenshotImage()
{
var bb = new BitmapBuffer(Global.Emulator.VideoProvider().BufferWidth, Global.Emulator.VideoProvider().BufferHeight, Global.Emulator.VideoProvider().GetVideoBuffer());
@ -3763,55 +3785,7 @@ namespace BizHawk.Client.EmuHawk
nesHawkToolStripMenuItem.Checked = Global.Config.NES_InQuickNES == false;
}
private void quickNESToolStripMenuItem_Click(object sender, EventArgs e)
{
Global.Config.NES_InQuickNES = true;
FlagNeedsReboot();
}
private void nesHawkToolStripMenuItem_Click(object sender, EventArgs e)
{
Global.Config.NES_InQuickNES = false;
FlagNeedsReboot();
}
private void GBAmGBAMenuItem_Click(object sender, EventArgs e)
{
Global.Config.GBA_UsemGBA = true;
FlagNeedsReboot();
}
private void GBAVBANextMenuItem_Click(object sender, EventArgs e)
{
Global.Config.GBA_UsemGBA = false;
FlagNeedsReboot();
}
private void GBACoreSelectionSubMenu_DropDownOpened(object sender, EventArgs e)
{
GBAmGBAMenuItem.Checked = Global.Config.GBA_UsemGBA == true;
GBAVBANextMenuItem.Checked = Global.Config.GBA_UsemGBA == false;
}
private void gBAWithMGBAToolStripMenuItem_Click(object sender, EventArgs e)
{
Global.Config.GBA_UsemGBA ^= true;
FlagNeedsReboot();
}
private void AutoHawkMenuItem_Click(object sender, EventArgs e)
{
GlobalWin.Tools.Load<AutoHawk>();
}
private void settingsToolStripMenuItem1_Click_1(object sender, EventArgs e)
{
GenericCoreConfig.DoDialog(this, "Apple II Settings");
}
private void PSXHashDiscsToolStripMenuItem_Click(object sender, EventArgs e)
{
new PSXHashDiscs().ShowDialog();
}
}
}

View File

@ -567,6 +567,9 @@
BBW3kfECg6SiSi9TP3UAAAAASUVORK5CYII=
</value>
</data>
<metadata name="timerMouseIdle.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>399, 13</value>
</metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>89</value>
</metadata>

View File

@ -34,6 +34,7 @@ namespace BizHawk.Client.EmuHawk
//http://stackoverflow.com/questions/547172/pass-through-mouse-events-to-parent-control (HTTRANSPARENT)
GraphicsControl.MouseDoubleClick += (o, e) => HandleFullscreenToggle(o, e);
GraphicsControl.MouseClick += (o, e) => GlobalWin.MainForm.MainForm_MouseClick(o, e);
GraphicsControl.MouseMove += (o, e) => GlobalWin.MainForm.MainForm_MouseMove(o, e);
}
bool IsDisposed = false;

View File

@ -180,6 +180,16 @@ namespace BizHawk.Client.EmuHawk.Properties {
}
}
/// <summary>
/// Looks up a localized resource of type System.Byte[].
/// </summary>
internal static byte[] BlankCursor {
get {
object obj = ResourceManager.GetObject("BlankCursor", resourceCulture);
return ((byte[])(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>

View File

@ -1494,4 +1494,7 @@
<data name="AppleIIKeyboard" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\images\ControllerImages\AppleIIKeyboard.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="BlankCursor" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\images\BlankCursor.cur;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
</root>

View File

@ -60,6 +60,9 @@
this.label5 = new System.Windows.Forms.Label();
this.tabControl1 = new System.Windows.Forms.TabControl();
this.tpAR = new System.Windows.Forms.TabPage();
this.label11 = new System.Windows.Forms.Label();
this.label10 = new System.Windows.Forms.Label();
this.nudPrescale = new System.Windows.Forms.NumericUpDown();
this.tpDispMethod = new System.Windows.Forms.TabPage();
this.label6 = new System.Windows.Forms.Label();
this.groupBox3 = new System.Windows.Forms.GroupBox();
@ -71,7 +74,7 @@
this.tabPage1 = new System.Windows.Forms.TabPage();
this.groupBox4 = new System.Windows.Forms.GroupBox();
this.label1 = new System.Windows.Forms.Label();
this.checkFullscreenHacks = new System.Windows.Forms.CheckBox();
this.cbFullscreenHacks = new System.Windows.Forms.CheckBox();
this.cbStatusBarFullscreen = new System.Windows.Forms.CheckBox();
this.cbMenuFullscreen = new System.Windows.Forms.CheckBox();
this.groupBox2 = new System.Windows.Forms.GroupBox();
@ -81,15 +84,14 @@
this.cbMenuWindowed = new System.Windows.Forms.CheckBox();
this.trackbarFrameSizeWindowed = new BizHawk.Client.EmuHawk.TransparentTrackBar();
this.cbCaptionWindowed = new System.Windows.Forms.CheckBox();
this.nudPrescale = new System.Windows.Forms.NumericUpDown();
this.label10 = new System.Windows.Forms.Label();
this.label11 = new System.Windows.Forms.Label();
this.cbFSAutohideMouse = new System.Windows.Forms.CheckBox();
this.groupBox1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.tbScanlineIntensity)).BeginInit();
this.grpFinalFilter.SuspendLayout();
this.grpARSelection.SuspendLayout();
this.tabControl1.SuspendLayout();
this.tpAR.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.nudPrescale)).BeginInit();
this.tpDispMethod.SuspendLayout();
this.groupBox3.SuspendLayout();
this.tpMisc.SuspendLayout();
@ -97,7 +99,6 @@
this.groupBox4.SuspendLayout();
this.groupBox2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.trackbarFrameSizeWindowed)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.nudPrescale)).BeginInit();
this.SuspendLayout();
//
// btnCancel
@ -446,6 +447,46 @@
this.tpAR.TabIndex = 0;
this.tpAR.Text = "Scaling & Filtering";
this.tpAR.UseVisualStyleBackColor = true;
//
// label11
//
this.label11.AutoSize = true;
this.label11.Location = new System.Drawing.Point(307, 117);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(14, 13);
this.label11.TabIndex = 16;
this.label11.Text = "X";
//
// label10
//
this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(208, 116);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(51, 13);
this.label10.TabIndex = 15;
this.label10.Text = "Prescale:";
//
// nudPrescale
//
this.nudPrescale.Location = new System.Drawing.Point(260, 113);
this.nudPrescale.Maximum = new decimal(new int[] {
16,
0,
0,
0});
this.nudPrescale.Minimum = new decimal(new int[] {
1,
0,
0,
0});
this.nudPrescale.Name = "nudPrescale";
this.nudPrescale.Size = new System.Drawing.Size(45, 20);
this.nudPrescale.TabIndex = 14;
this.nudPrescale.Value = new decimal(new int[] {
1,
0,
0,
0});
//
// tpDispMethod
//
@ -547,13 +588,14 @@
//
// groupBox4
//
this.groupBox4.Controls.Add(this.cbFSAutohideMouse);
this.groupBox4.Controls.Add(this.label1);
this.groupBox4.Controls.Add(this.checkFullscreenHacks);
this.groupBox4.Controls.Add(this.cbFullscreenHacks);
this.groupBox4.Controls.Add(this.cbStatusBarFullscreen);
this.groupBox4.Controls.Add(this.cbMenuFullscreen);
this.groupBox4.Location = new System.Drawing.Point(143, 6);
this.groupBox4.Name = "groupBox4";
this.groupBox4.Size = new System.Drawing.Size(266, 212);
this.groupBox4.Size = new System.Drawing.Size(266, 235);
this.groupBox4.TabIndex = 27;
this.groupBox4.TabStop = false;
this.groupBox4.Text = "Fullscreen";
@ -566,15 +608,15 @@
this.label1.TabIndex = 27;
this.label1.Text = resources.GetString("label1.Text");
//
// checkFullscreenHacks
// cbFullscreenHacks
//
this.checkFullscreenHacks.AutoSize = true;
this.checkFullscreenHacks.Location = new System.Drawing.Point(6, 65);
this.checkFullscreenHacks.Name = "checkFullscreenHacks";
this.checkFullscreenHacks.Size = new System.Drawing.Size(191, 17);
this.checkFullscreenHacks.TabIndex = 26;
this.checkFullscreenHacks.Text = "Enable Windows Fullscreen Hacks";
this.checkFullscreenHacks.UseVisualStyleBackColor = true;
this.cbFullscreenHacks.AutoSize = true;
this.cbFullscreenHacks.Location = new System.Drawing.Point(6, 65);
this.cbFullscreenHacks.Name = "cbFullscreenHacks";
this.cbFullscreenHacks.Size = new System.Drawing.Size(191, 17);
this.cbFullscreenHacks.TabIndex = 26;
this.cbFullscreenHacks.Text = "Enable Windows Fullscreen Hacks";
this.cbFullscreenHacks.UseVisualStyleBackColor = true;
//
// cbStatusBarFullscreen
//
@ -606,7 +648,7 @@
this.groupBox2.Controls.Add(this.cbCaptionWindowed);
this.groupBox2.Location = new System.Drawing.Point(6, 6);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(131, 212);
this.groupBox2.Size = new System.Drawing.Size(131, 235);
this.groupBox2.TabIndex = 26;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "Windowed";
@ -670,45 +712,15 @@
this.cbCaptionWindowed.Text = "Caption";
this.cbCaptionWindowed.UseVisualStyleBackColor = true;
//
// nudPrescale
// cbFSAutohideMouse
//
this.nudPrescale.Location = new System.Drawing.Point(260, 113);
this.nudPrescale.Maximum = new decimal(new int[] {
16,
0,
0,
0});
this.nudPrescale.Minimum = new decimal(new int[] {
1,
0,
0,
0});
this.nudPrescale.Name = "nudPrescale";
this.nudPrescale.Size = new System.Drawing.Size(45, 20);
this.nudPrescale.TabIndex = 14;
this.nudPrescale.Value = new decimal(new int[] {
1,
0,
0,
0});
//
// label10
//
this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(208, 116);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(51, 13);
this.label10.TabIndex = 15;
this.label10.Text = "Prescale:";
//
// label11
//
this.label11.AutoSize = true;
this.label11.Location = new System.Drawing.Point(307, 117);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(14, 13);
this.label11.TabIndex = 16;
this.label11.Text = "X";
this.cbFSAutohideMouse.AutoSize = true;
this.cbFSAutohideMouse.Location = new System.Drawing.Point(87, 19);
this.cbFSAutohideMouse.Name = "cbFSAutohideMouse";
this.cbFSAutohideMouse.Size = new System.Drawing.Size(139, 17);
this.cbFSAutohideMouse.TabIndex = 28;
this.cbFSAutohideMouse.Text = "Auto-hide Mouse Cursor";
this.cbFSAutohideMouse.UseVisualStyleBackColor = true;
//
// DisplayConfigLite
//
@ -734,6 +746,7 @@
this.tabControl1.ResumeLayout(false);
this.tpAR.ResumeLayout(false);
this.tpAR.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.nudPrescale)).EndInit();
this.tpDispMethod.ResumeLayout(false);
this.groupBox3.ResumeLayout(false);
this.groupBox3.PerformLayout();
@ -745,7 +758,6 @@
this.groupBox2.ResumeLayout(false);
this.groupBox2.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.trackbarFrameSizeWindowed)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.nudPrescale)).EndInit();
this.ResumeLayout(false);
}
@ -803,9 +815,10 @@
private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.Label lblFrameTypeWindowed;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.CheckBox checkFullscreenHacks;
private System.Windows.Forms.CheckBox cbFullscreenHacks;
private System.Windows.Forms.Label label11;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.NumericUpDown nudPrescale;
private System.Windows.Forms.CheckBox cbFSAutohideMouse;
}
}

View File

@ -34,7 +34,7 @@ namespace BizHawk.Client.EmuHawk.config
tbScanlineIntensity.Value = Global.Config.TargetScanlineFilterIntensity;
checkLetterbox.Checked = Global.Config.DispFixAspectRatio;
checkPadInteger.Checked = Global.Config.DispFixScaleInteger;
checkFullscreenHacks.Checked = Global.Config.DispFullscreenHacks;
cbFullscreenHacks.Checked = Global.Config.DispFullscreenHacks;
rbOpenGL.Checked = Global.Config.DispMethod == Config.EDispMethod.OpenGL;
rbGDIPlus.Checked = Global.Config.DispMethod == Config.EDispMethod.GdiPlus;
@ -46,6 +46,7 @@ namespace BizHawk.Client.EmuHawk.config
cbStatusBarFullscreen.Checked = Global.Config.DispChrome_StatusBarFullscreen;
cbMenuFullscreen.Checked = Global.Config.DispChrome_MenuFullscreen;
trackbarFrameSizeWindowed.Value = Global.Config.DispChrome_FrameWindowed;
cbFSAutohideMouse.Checked = Global.Config.DispChrome_Fullscreen_AutohideMouse;
SyncTrackbar();
nudPrescale.Value = Global.Config.DispPrescale;
@ -96,7 +97,7 @@ namespace BizHawk.Client.EmuHawk.config
Global.Config.TargetScanlineFilterIntensity = tbScanlineIntensity.Value;
Global.Config.DispFixAspectRatio = checkLetterbox.Checked;
Global.Config.DispFixScaleInteger = checkPadInteger.Checked;
Global.Config.DispFullscreenHacks = checkFullscreenHacks.Checked;
Global.Config.DispFullscreenHacks = cbFullscreenHacks.Checked;
Global.Config.DispChrome_StatusBarWindowed = cbStatusBarWindowed.Checked;
Global.Config.DispChrome_CaptionWindowed = cbCaptionWindowed.Checked;
@ -104,6 +105,7 @@ namespace BizHawk.Client.EmuHawk.config
Global.Config.DispChrome_StatusBarFullscreen = cbStatusBarFullscreen.Checked;
Global.Config.DispChrome_MenuFullscreen = cbMenuFullscreen.Checked;
Global.Config.DispChrome_FrameWindowed = trackbarFrameSizeWindowed.Value;
Global.Config.DispChrome_Fullscreen_AutohideMouse = cbFSAutohideMouse.Checked;
// HACK:: null emulator's settings don't persist to config normally
{

View File

@ -47,6 +47,7 @@
this.StartPausedCheckbox = new System.Windows.Forms.CheckBox();
this.PauseWhenMenuActivatedCheckbox = new System.Windows.Forms.CheckBox();
this.tabPage3 = new System.Windows.Forms.TabPage();
this.LuaDuringTurboCheckbox = new System.Windows.Forms.CheckBox();
this.label12 = new System.Windows.Forms.Label();
this.label13 = new System.Windows.Forms.Label();
this.FrameAdvSkipLagCheckbox = new System.Windows.Forms.CheckBox();
@ -56,10 +57,11 @@
this.label4 = new System.Windows.Forms.Label();
this.LogWindowAsConsoleCheckbox = new System.Windows.Forms.CheckBox();
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
this.LuaDuringTurboCheckbox = new System.Windows.Forms.CheckBox();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.tabControl1.SuspendLayout();
this.tabPage1.SuspendLayout();
this.tabPage3.SuspendLayout();
this.groupBox1.SuspendLayout();
this.SuspendLayout();
//
// OkBtn
@ -100,10 +102,7 @@
//
// tabPage1
//
this.tabPage1.Controls.Add(this.StartFullScreenCheckbox);
this.tabPage1.Controls.Add(this.label14);
this.tabPage1.Controls.Add(this.label3);
this.tabPage1.Controls.Add(this.SingleInstanceModeCheckbox);
this.tabPage1.Controls.Add(this.groupBox1);
this.tabPage1.Controls.Add(this.NeverAskSaveCheckbox);
this.tabPage1.Controls.Add(this.label2);
this.tabPage1.Controls.Add(this.AcceptBackgroundInputCheckbox);
@ -111,7 +110,6 @@
this.tabPage1.Controls.Add(this.RunInBackgroundCheckbox);
this.tabPage1.Controls.Add(this.SaveWindowPositionCheckbox);
this.tabPage1.Controls.Add(this.EnableContextMenuCheckbox);
this.tabPage1.Controls.Add(this.StartPausedCheckbox);
this.tabPage1.Controls.Add(this.PauseWhenMenuActivatedCheckbox);
this.tabPage1.Location = new System.Drawing.Point(4, 22);
this.tabPage1.Name = "tabPage1";
@ -124,7 +122,7 @@
// StartFullScreenCheckbox
//
this.StartFullScreenCheckbox.AutoSize = true;
this.StartFullScreenCheckbox.Location = new System.Drawing.Point(98, 63);
this.StartFullScreenCheckbox.Location = new System.Drawing.Point(6, 42);
this.StartFullScreenCheckbox.Name = "StartFullScreenCheckbox";
this.StartFullScreenCheckbox.Size = new System.Drawing.Size(110, 17);
this.StartFullScreenCheckbox.TabIndex = 3;
@ -134,25 +132,25 @@
// label14
//
this.label14.AutoSize = true;
this.label14.Location = new System.Drawing.Point(26, 246);
this.label14.Location = new System.Drawing.Point(26, 99);
this.label14.Name = "label14";
this.label14.Size = new System.Drawing.Size(303, 13);
this.label14.Size = new System.Drawing.Size(306, 13);
this.label14.TabIndex = 12;
this.label14.Text = "Note: Requires closing and reopening EmuHawk to take effect";
this.label14.Text = "Note: Requires closing and reopening EmuHawk to take effect.";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(26, 232);
this.label3.Location = new System.Drawing.Point(26, 85);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(272, 13);
this.label3.Size = new System.Drawing.Size(275, 13);
this.label3.TabIndex = 11;
this.label3.Text = "Enable to force only one instance of EmuHawk at a time";
this.label3.Text = "Enable to force only one instance of EmuHawk at a time.";
//
// SingleInstanceModeCheckbox
//
this.SingleInstanceModeCheckbox.AutoSize = true;
this.SingleInstanceModeCheckbox.Location = new System.Drawing.Point(6, 212);
this.SingleInstanceModeCheckbox.Location = new System.Drawing.Point(6, 65);
this.SingleInstanceModeCheckbox.Name = "SingleInstanceModeCheckbox";
this.SingleInstanceModeCheckbox.Size = new System.Drawing.Size(127, 17);
this.SingleInstanceModeCheckbox.TabIndex = 10;
@ -162,7 +160,7 @@
// NeverAskSaveCheckbox
//
this.NeverAskSaveCheckbox.AutoSize = true;
this.NeverAskSaveCheckbox.Location = new System.Drawing.Point(6, 109);
this.NeverAskSaveCheckbox.Location = new System.Drawing.Point(6, 72);
this.NeverAskSaveCheckbox.Name = "NeverAskSaveCheckbox";
this.NeverAskSaveCheckbox.Size = new System.Drawing.Size(184, 17);
this.NeverAskSaveCheckbox.TabIndex = 5;
@ -172,7 +170,7 @@
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(26, 192);
this.label2.Location = new System.Drawing.Point(26, 155);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(349, 13);
this.label2.TabIndex = 9;
@ -181,7 +179,7 @@
// AcceptBackgroundInputCheckbox
//
this.AcceptBackgroundInputCheckbox.AutoSize = true;
this.AcceptBackgroundInputCheckbox.Location = new System.Drawing.Point(6, 172);
this.AcceptBackgroundInputCheckbox.Location = new System.Drawing.Point(6, 135);
this.AcceptBackgroundInputCheckbox.Name = "AcceptBackgroundInputCheckbox";
this.AcceptBackgroundInputCheckbox.Size = new System.Drawing.Size(146, 17);
this.AcceptBackgroundInputCheckbox.TabIndex = 8;
@ -191,7 +189,7 @@
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(26, 152);
this.label1.Location = new System.Drawing.Point(26, 115);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(315, 13);
this.label1.TabIndex = 7;
@ -200,7 +198,7 @@
// RunInBackgroundCheckbox
//
this.RunInBackgroundCheckbox.AutoSize = true;
this.RunInBackgroundCheckbox.Location = new System.Drawing.Point(6, 132);
this.RunInBackgroundCheckbox.Location = new System.Drawing.Point(6, 95);
this.RunInBackgroundCheckbox.Name = "RunInBackgroundCheckbox";
this.RunInBackgroundCheckbox.Size = new System.Drawing.Size(117, 17);
this.RunInBackgroundCheckbox.TabIndex = 6;
@ -210,7 +208,7 @@
// SaveWindowPositionCheckbox
//
this.SaveWindowPositionCheckbox.AutoSize = true;
this.SaveWindowPositionCheckbox.Location = new System.Drawing.Point(6, 86);
this.SaveWindowPositionCheckbox.Location = new System.Drawing.Point(6, 49);
this.SaveWindowPositionCheckbox.Name = "SaveWindowPositionCheckbox";
this.SaveWindowPositionCheckbox.Size = new System.Drawing.Size(133, 17);
this.SaveWindowPositionCheckbox.TabIndex = 4;
@ -220,7 +218,7 @@
// EnableContextMenuCheckbox
//
this.EnableContextMenuCheckbox.AutoSize = true;
this.EnableContextMenuCheckbox.Location = new System.Drawing.Point(6, 40);
this.EnableContextMenuCheckbox.Location = new System.Drawing.Point(6, 26);
this.EnableContextMenuCheckbox.Name = "EnableContextMenuCheckbox";
this.EnableContextMenuCheckbox.Size = new System.Drawing.Size(128, 17);
this.EnableContextMenuCheckbox.TabIndex = 1;
@ -230,7 +228,7 @@
// StartPausedCheckbox
//
this.StartPausedCheckbox.AutoSize = true;
this.StartPausedCheckbox.Location = new System.Drawing.Point(6, 63);
this.StartPausedCheckbox.Location = new System.Drawing.Point(6, 19);
this.StartPausedCheckbox.Name = "StartPausedCheckbox";
this.StartPausedCheckbox.Size = new System.Drawing.Size(86, 17);
this.StartPausedCheckbox.TabIndex = 2;
@ -240,7 +238,7 @@
// PauseWhenMenuActivatedCheckbox
//
this.PauseWhenMenuActivatedCheckbox.AutoSize = true;
this.PauseWhenMenuActivatedCheckbox.Location = new System.Drawing.Point(6, 17);
this.PauseWhenMenuActivatedCheckbox.Location = new System.Drawing.Point(6, 3);
this.PauseWhenMenuActivatedCheckbox.Name = "PauseWhenMenuActivatedCheckbox";
this.PauseWhenMenuActivatedCheckbox.Size = new System.Drawing.Size(161, 17);
this.PauseWhenMenuActivatedCheckbox.TabIndex = 0;
@ -265,6 +263,16 @@
this.tabPage3.Text = "Advanced";
this.tabPage3.UseVisualStyleBackColor = true;
//
// LuaDuringTurboCheckbox
//
this.LuaDuringTurboCheckbox.AutoSize = true;
this.LuaDuringTurboCheckbox.Location = new System.Drawing.Point(6, 174);
this.LuaDuringTurboCheckbox.Name = "LuaDuringTurboCheckbox";
this.LuaDuringTurboCheckbox.Size = new System.Drawing.Size(166, 17);
this.LuaDuringTurboCheckbox.TabIndex = 15;
this.LuaDuringTurboCheckbox.Text = "Run lua scripts when turboing";
this.LuaDuringTurboCheckbox.UseVisualStyleBackColor = true;
//
// label12
//
this.label12.AutoSize = true;
@ -296,7 +304,7 @@
// label9
//
this.label9.AutoSize = true;
this.label9.Location = new System.Drawing.Point(24, 90);
this.label9.Location = new System.Drawing.Point(24, 94);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(99, 13);
this.label9.TabIndex = 11;
@ -305,7 +313,7 @@
// label10
//
this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(24, 77);
this.label10.Location = new System.Drawing.Point(24, 81);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(277, 13);
this.label10.TabIndex = 10;
@ -340,15 +348,19 @@
this.LogWindowAsConsoleCheckbox.Text = "Create the log window as a console window";
this.LogWindowAsConsoleCheckbox.UseVisualStyleBackColor = true;
//
// LuaDuringTurboCheckbox
// groupBox1
//
this.LuaDuringTurboCheckbox.AutoSize = true;
this.LuaDuringTurboCheckbox.Location = new System.Drawing.Point(6, 180);
this.LuaDuringTurboCheckbox.Name = "LuaDuringTurboCheckbox";
this.LuaDuringTurboCheckbox.Size = new System.Drawing.Size(166, 17);
this.LuaDuringTurboCheckbox.TabIndex = 15;
this.LuaDuringTurboCheckbox.Text = "Run lua scripts when turboing";
this.LuaDuringTurboCheckbox.UseVisualStyleBackColor = true;
this.groupBox1.Controls.Add(this.StartPausedCheckbox);
this.groupBox1.Controls.Add(this.label14);
this.groupBox1.Controls.Add(this.StartFullScreenCheckbox);
this.groupBox1.Controls.Add(this.label3);
this.groupBox1.Controls.Add(this.SingleInstanceModeCheckbox);
this.groupBox1.Location = new System.Drawing.Point(6, 177);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(369, 140);
this.groupBox1.TabIndex = 13;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "Startup Options";
//
// EmuHawkOptions
//
@ -370,6 +382,8 @@
this.tabPage1.PerformLayout();
this.tabPage3.ResumeLayout(false);
this.tabPage3.PerformLayout();
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.ResumeLayout(false);
}
@ -404,5 +418,6 @@
private System.Windows.Forms.Label label14;
private System.Windows.Forms.CheckBox StartFullScreenCheckbox;
private System.Windows.Forms.CheckBox LuaDuringTurboCheckbox;
private System.Windows.Forms.GroupBox groupBox1;
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 326 B

View File

@ -32,6 +32,7 @@ namespace BizHawk.Bizware.BizwareGL
Managed.MouseClick += (object sender, MouseEventArgs e) => OnMouseClick(e);
Managed.MouseEnter += (object sender, EventArgs e) => OnMouseEnter(e);
Managed.MouseLeave += (object sender, EventArgs e) => OnMouseLeave(e);
Managed.MouseMove += (object sender, MouseEventArgs e) => OnMouseMove(e);
//the GraphicsControl is occupying all of our area. So we pretty much never get paint events ourselves.
//So lets capture its paint event and use it for ourselves (it doesnt know how to do anything, anyway)