Added logic to lock emulation when adding or deleting cheats.

This commit is contained in:
Matthew Budd 2020-08-02 20:29:24 -04:00
parent 53c96c9fbd
commit 7d6f1fdacc
1 changed files with 4 additions and 0 deletions

View File

@ -707,7 +707,9 @@ void GuiCheatsDialog_t::addActvCheat(void)
name = cheatNameEntry->text().toStdString(); name = cheatNameEntry->text().toStdString();
fceuWrapperLock();
FCEUI_AddCheat( name.c_str(), a, v, c, 1 ); FCEUI_AddCheat( name.c_str(), a, v, c, 1 );
fceuWrapperUnLock();
showActiveCheatList(true); showActiveCheatList(true);
} }
@ -726,7 +728,9 @@ void GuiCheatsDialog_t::deleteActvCheat(void)
int row = actvCheatList->indexOfTopLevelItem(item); int row = actvCheatList->indexOfTopLevelItem(item);
fceuWrapperLock();
FCEUI_DelCheat (row); FCEUI_DelCheat (row);
fceuWrapperUnLock();
showActiveCheatList(true); showActiveCheatList(true);