mirror of
https://github.com/libretro/Mesen.git
synced 2025-02-01 22:33:37 +00:00
Focus: Fixed bug where the Mesen window was sometimes considered as "in the background" when it wasn't.
This commit is contained in:
parent
f3b4d0266a
commit
2b440f2374
2
GUI.NET/Forms/frmMain.Designer.cs
generated
2
GUI.NET/Forms/frmMain.Designer.cs
generated
@ -172,8 +172,6 @@ namespace Mesen.GUI.Forms
|
||||
this.menuStrip.Size = new System.Drawing.Size(304, 26);
|
||||
this.menuStrip.TabIndex = 0;
|
||||
this.menuStrip.Text = "menuStrip1";
|
||||
this.menuStrip.MenuActivate += new System.EventHandler(this.menuStrip_MenuActivate);
|
||||
this.menuStrip.MenuDeactivate += new System.EventHandler(this.menuStrip_MenuDeactivate);
|
||||
this.menuStrip.VisibleChanged += new System.EventHandler(this.menuStrip_VisibleChanged);
|
||||
//
|
||||
// mnuFile
|
||||
|
@ -30,7 +30,6 @@ namespace Mesen.GUI.Forms
|
||||
private bool _customSize = false;
|
||||
private bool _fullscreenMode = false;
|
||||
private double _regularScale = ConfigManager.Config.VideoInfo.VideoScale;
|
||||
private bool _menuOpened = false;
|
||||
|
||||
public frmMain(string[] args)
|
||||
{
|
||||
@ -413,8 +412,11 @@ namespace Mesen.GUI.Forms
|
||||
}
|
||||
}
|
||||
|
||||
if(_menuOpened) {
|
||||
hasFocus = false;
|
||||
foreach(ToolStripItem item in menuStrip.Items) {
|
||||
if(item.Pressed || item.Selected) {
|
||||
hasFocus = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
InteropEmu.SetFlag(EmulationFlags.InBackground, !hasFocus);
|
||||
@ -1137,16 +1139,6 @@ namespace Mesen.GUI.Forms
|
||||
CheckForUpdates(true);
|
||||
}
|
||||
|
||||
private void menuStrip_MenuActivate(object sender, EventArgs e)
|
||||
{
|
||||
_menuOpened = true;
|
||||
}
|
||||
|
||||
private void menuStrip_MenuDeactivate(object sender, EventArgs e)
|
||||
{
|
||||
_menuOpened = false;
|
||||
}
|
||||
|
||||
private void InitializeVsSystemMenu()
|
||||
{
|
||||
sepVsSystem.Visible = InteropEmu.IsVsSystem();
|
||||
|
Loading…
x
Reference in New Issue
Block a user