From 1e0c65150bfffd0730638915bd14ec4d12929416 Mon Sep 17 00:00:00 2001 From: adelikat Date: Sun, 1 Mar 2015 20:00:42 +0000 Subject: [PATCH] MultiHawk - fix stuff --- .../BizHawk.Client.MultiHawk.csproj | 2 +- BizHawk.Client.MultiHawk/Mainform.cs | 27 ++++++++++++++----- 2 files changed, 21 insertions(+), 8 deletions(-) diff --git a/BizHawk.Client.MultiHawk/BizHawk.Client.MultiHawk.csproj b/BizHawk.Client.MultiHawk/BizHawk.Client.MultiHawk.csproj index b3029a4653..9ed2b01d32 100644 --- a/BizHawk.Client.MultiHawk/BizHawk.Client.MultiHawk.csproj +++ b/BizHawk.Client.MultiHawk/BizHawk.Client.MultiHawk.csproj @@ -18,7 +18,7 @@ true full false - ..\..\output\ + ..\output\ TRACE;DEBUG;WINDOWS prompt 4 diff --git a/BizHawk.Client.MultiHawk/Mainform.cs b/BizHawk.Client.MultiHawk/Mainform.cs index 6f571a7b33..6e09263d1b 100644 --- a/BizHawk.Client.MultiHawk/Mainform.cs +++ b/BizHawk.Client.MultiHawk/Mainform.cs @@ -246,6 +246,16 @@ namespace BizHawk.Client.MultiHawk } } + private string StripArchivePath(string path) + { + if (path.Contains("|")) + { + return path.Split('|').Last(); + } + + return path; + } + private bool LoadRom(string path) { bool deterministic = true; @@ -272,7 +282,7 @@ namespace BizHawk.Client.MultiHawk var ew = new EmulatorWindow(this) { TopLevel = false, - Text = Path.GetFileNameWithoutExtension(path), + Text = Path.GetFileNameWithoutExtension(StripArchivePath(path)), Emulator = loader.LoadedEmulator, GL = new Bizware.BizwareGL.Drivers.OpenTK.IGL_TK(), @@ -555,7 +565,7 @@ namespace BizHawk.Client.MultiHawk } public void ProgramRunLoop() - { + { CheckMessages(); for (; ; ) @@ -588,12 +598,15 @@ namespace BizHawk.Client.MultiHawk // autohold/autofire must not be affected by the following inputs Global.ActiveController.Overrides(Global.LuaAndAdaptor); - StepRunLoop_Core(); - StepRunLoop_Throttle(); - - foreach (var window in EmulatorWindows) + if (EmulatorWindows.Any()) { - window.Render(); + StepRunLoop_Core(); + StepRunLoop_Throttle(); + + foreach (var window in EmulatorWindows) + { + window.Render(); + } } CheckMessages();