Further fixes for entry boxes in Qt Cheat Window.

This commit is contained in:
mjbudd77 2021-05-12 20:16:38 -04:00
parent 884bf21d4d
commit 15a6584685
1 changed files with 12 additions and 9 deletions

View File

@ -559,9 +559,9 @@ void GuiCheatsDialog_t::knownValueCallback(void)
//printf("Cheat Search Known!\n");
fceuWrapperLock();
//printf("%s\n", knownValEntry->text().toStdString().c_str() );
//printf("'%s'\n", knownValEntry->displayText().toStdString().c_str() );
value = strtol(knownValEntry->text().toStdString().c_str(), NULL, 16);
value = strtol(knownValEntry->displayText().toStdString().c_str(), NULL, 16);
FCEUI_CheatSearchEnd(FCEU_SEARCH_NEWVAL_KNOWN, value, 0);
@ -592,7 +592,7 @@ void GuiCheatsDialog_t::notEqualValueCallback(void)
if (checked)
{
value = strtol(neValEntry->text().toStdString().c_str(), NULL, 16);
value = strtol(neValEntry->displayText().toStdString().c_str(), NULL, 16);
FCEUI_CheatSearchEnd(FCEU_SEARCH_PUERLY_RELATIVE_CHANGE, 0, value);
}
@ -616,7 +616,7 @@ void GuiCheatsDialog_t::greaterThanValueCallback(void)
if (checked)
{
value = strtol(grValEntry->text().toStdString().c_str(), NULL, 16);
value = strtol(grValEntry->displayText().toStdString().c_str(), NULL, 16);
FCEUI_CheatSearchEnd(FCEU_SEARCH_NEWVAL_GT_KNOWN, 0, value);
}
@ -640,7 +640,7 @@ void GuiCheatsDialog_t::lessThanValueCallback(void)
if (checked)
{
value = strtol(ltValEntry->text().toStdString().c_str(), NULL, 16);
value = strtol(ltValEntry->displayText().toStdString().c_str(), NULL, 16);
FCEUI_CheatSearchEnd(FCEU_SEARCH_NEWVAL_LT_KNOWN, 0, value);
}
@ -861,9 +861,9 @@ void GuiCheatsDialog_t::addActvCheat(void)
v = strtoul(cheatValEntry->displayText().toStdString().c_str(), NULL, 16);
cmpStr = cheatCmpEntry->text().toStdString();
cmpStr = cheatCmpEntry->displayText().toStdString();
if (isdigit(cmpStr[0]))
if (isxdigit(cmpStr[0]))
{
c = strtoul(cmpStr.c_str(), NULL, 16);
}
@ -935,9 +935,11 @@ void GuiCheatsDialog_t::updateCheatParameters(void)
v = strtoul(cheatValEntry->displayText().toStdString().c_str(), NULL, 16);
cmpStr = cheatCmpEntry->text().toStdString();
cmpStr = cheatCmpEntry->displayText().toStdString();
if (isdigit(cmpStr[0]))
//printf("CMP: '%s' \n", cmpStr.c_str() );
if (isxdigit(cmpStr[0]))
{
c = strtoul(cmpStr.c_str(), NULL, 16);
}
@ -945,6 +947,7 @@ void GuiCheatsDialog_t::updateCheatParameters(void)
{
c = -1;
}
//printf("CMP: '%i' 0x%X\n", c, c );
name = cheatNameEntry->text().toStdString();