- Fixes RAM Watch, RAM Search, and RAM Poke usability issue w/negative
numbers.
- Bonus fix for unhandled exception when entering . in to the specific
value box
This commit is contained in:
Isotarge 2016-07-22 02:15:43 +09:30
parent 41ff244e01
commit e0ac148e76
1 changed files with 3 additions and 3 deletions

View File

@ -282,7 +282,7 @@ namespace BizHawk.Client.EmuHawk
if (e.KeyChar == '.') if (e.KeyChar == '.')
{ {
if (Text.Contains(".")) if (Text.Contains(".") && !SelectedText.Contains("."))
{ {
e.Handled = true; e.Handled = true;
return; return;
@ -290,7 +290,7 @@ namespace BizHawk.Client.EmuHawk
} }
else if (e.KeyChar == '-') else if (e.KeyChar == '-')
{ {
if (Text.Contains("-")) if (Text.Contains("-") && !SelectedText.Contains("-"))
{ {
e.Handled = true; e.Handled = true;
return; return;
@ -686,7 +686,7 @@ namespace BizHawk.Client.EmuHawk
case DisplayType.Float: case DisplayType.Float:
if (Text.IsFloat()) if (Text.IsFloat())
{ {
if (Text == "-") if (Text == "-" || Text == ".")
return 0; return 0;
float val = float.Parse(Text); float val = float.Parse(Text);
var bytes = BitConverter.GetBytes(val); var bytes = BitConverter.GetBytes(val);