From 17ce177e5fbff6392ebd9f1be2fabd85dcc87b0f Mon Sep 17 00:00:00 2001 From: scrimpey Date: Fri, 19 Jun 2015 20:32:05 +0000 Subject: [PATCH] Debugger - Make Register Boxes use Hex input. --- .../tools/Debugger/RegisterBoxControl.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/BizHawk.Client.EmuHawk/tools/Debugger/RegisterBoxControl.cs b/BizHawk.Client.EmuHawk/tools/Debugger/RegisterBoxControl.cs index 5e6a4ae271..31738033c7 100644 --- a/BizHawk.Client.EmuHawk/tools/Debugger/RegisterBoxControl.cs +++ b/BizHawk.Client.EmuHawk/tools/Debugger/RegisterBoxControl.cs @@ -178,12 +178,19 @@ namespace BizHawk.Client.EmuHawk { try { - Core.SetCpuRegister(t.Name, int.Parse(t.Text)); + if (t.Text != String.Empty) + { + Core.SetCpuRegister(t.Name, int.Parse(t.Text, System.Globalization.NumberStyles.HexNumber)); + } } catch (InvalidOperationException) { t.Enabled = false; } + catch (FormatException) + { + + } } };