route savestate stuff through EmuThread

This commit is contained in:
Arisotura
2024-10-24 19:27:45 +02:00
parent 3fc065d72d
commit 75e6856af4
3 changed files with 73 additions and 52 deletions

View File

@ -76,6 +76,10 @@ public:
msg_InsertGBACart,
msg_InsertGBAAddon,
msg_EjectGBACart,
msg_LoadState,
msg_SaveState,
msg_UndoStateLoad,
};
struct Message
@ -111,6 +115,10 @@ public:
void ejectCart(bool gba);
int insertGBAAddon(int type);
int saveState(const QString& filename);
int loadState(const QString& filename);
int undoStateLoad();
bool emuIsRunning();
bool emuIsActive();
@ -164,7 +172,7 @@ private:
constexpr static int emuPauseStackPauseThreshold = 1;
int emuPauseStack;
int bootResult = 0;
int msgResult = 0;
QMutex msgMutex;
QSemaphore msgSemaphore;