Fix #669
- 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:
parent
41ff244e01
commit
e0ac148e76
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue