From 7ea52dfc8d268e192144fe0836a99fb1319d3b5f Mon Sep 17 00:00:00 2001 From: zeromus Date: Sat, 18 Feb 2012 20:44:54 +0000 Subject: [PATCH] fix bug in mnemonics generator that made it not as versatile as it was meant to be --- BizHawk.MultiClient/movie/InputAdapters.cs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/BizHawk.MultiClient/movie/InputAdapters.cs b/BizHawk.MultiClient/movie/InputAdapters.cs index 42b67f2e10..17d4a16145 100644 --- a/BizHawk.MultiClient/movie/InputAdapters.cs +++ b/BizHawk.MultiClient/movie/InputAdapters.cs @@ -164,15 +164,13 @@ namespace BizHawk.MultiClient bool IsBasePressed(string name) { bool ret = Source.IsPressed(name); - if (ret) - { - //int zzz=9; - } return ret; } public string GetControllersAsMnemonic() { + bool hasGlobalEmulator = Global.Emulator != null; + StringBuilder input = new StringBuilder("|"); if (ControlType == "Genesis 3-Button Controller") @@ -249,8 +247,8 @@ namespace BizHawk.MultiClient if (ControlType == "NES Controls") { - input.Append(IsBasePressed("Reset") ? "r" : - Global.Emulator.IsLagFrame ? "L" : "."); + input.Append(IsBasePressed("Reset") ? "r" : + (hasGlobalEmulator && Global.Emulator.IsLagFrame) ? "L" : "."); input.Append("|"); for (int player = 1; player <= 4; player++) {