From 7d6f1fdacc214954b9f5718fc240f07abd9a9978 Mon Sep 17 00:00:00 2001 From: Matthew Budd Date: Sun, 2 Aug 2020 20:29:24 -0400 Subject: [PATCH] Added logic to lock emulation when adding or deleting cheats. --- src/drivers/Qt/CheatsConf.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/drivers/Qt/CheatsConf.cpp b/src/drivers/Qt/CheatsConf.cpp index bc39339d..e8da1dc5 100644 --- a/src/drivers/Qt/CheatsConf.cpp +++ b/src/drivers/Qt/CheatsConf.cpp @@ -707,7 +707,9 @@ void GuiCheatsDialog_t::addActvCheat(void) name = cheatNameEntry->text().toStdString(); + fceuWrapperLock(); FCEUI_AddCheat( name.c_str(), a, v, c, 1 ); + fceuWrapperUnLock(); showActiveCheatList(true); } @@ -726,7 +728,9 @@ void GuiCheatsDialog_t::deleteActvCheat(void) int row = actvCheatList->indexOfTopLevelItem(item); + fceuWrapperLock(); FCEUI_DelCheat (row); + fceuWrapperUnLock(); showActiveCheatList(true);