From 48bf9616dba66afef87d86eff4f848cf89fc03ab Mon Sep 17 00:00:00 2001 From: zeromus Date: Sat, 12 Dec 2015 13:25:59 -0600 Subject: [PATCH] fix --fullscreen and fullscreenOnLoad options --- BizHawk.Client.EmuHawk/MainForm.cs | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/BizHawk.Client.EmuHawk/MainForm.cs b/BizHawk.Client.EmuHawk/MainForm.cs index f8a5d5b6bd..943128d917 100644 --- a/BizHawk.Client.EmuHawk/MainForm.cs +++ b/BizHawk.Client.EmuHawk/MainForm.cs @@ -405,7 +405,7 @@ namespace BizHawk.Client.EmuHawk if (startFullscreen || Global.Config.StartFullscreen) { - ToggleFullscreen(); + _needsFullscreenOnLoad = true; } if (!Global.Game.IsNullInstance) @@ -464,9 +464,23 @@ namespace BizHawk.Client.EmuHawk public void ProgramRunLoop() { - CheckMessages(); + CheckMessages(); //can someone leave a note about why this is needed? LogConsole.PositionConsole(); + //needs to be done late, after the log console snaps on top + //fullscreen should snap on top even harder! + if (_needsFullscreenOnLoad) + { + _needsFullscreenOnLoad = false; + ToggleFullscreen(); + } + + //incantation required to get the program reliably on top of the console window + //we might want it in ToggleFullscreen later, but here, it needs to happen regardless + BringToFront(); + Activate(); + BringToFront(); + for (;;) { Input.Instance.Update(); @@ -1330,6 +1344,7 @@ namespace BizHawk.Client.EmuHawk private bool _cursorHidden; private bool _inFullscreen; private Point _windowedLocation; + private bool _needsFullscreenOnLoad; private int _autoDumpLength; private readonly bool _autoCloseOnDump;