Implement pause/resume

This commit is contained in:
wheremyfoodat 2023-07-26 19:29:34 +03:00
parent 9ad34dd6c9
commit 1107dff9fa
2 changed files with 17 additions and 4 deletions

View file

@ -59,7 +59,8 @@ class Emulator {
static constexpr u32 width = 400;
static constexpr u32 height = 240 * 2; // * 2 because 2 screens
ROMType romType = ROMType::None;
bool running = true;
bool running = false; // Is the emulator running a game?
bool programRunning = false; // Is the emulator program itself running?
#ifdef PANDA3DS_ENABLE_HTTP_SERVER
HttpServer httpServer;
@ -89,6 +90,9 @@ class Emulator {
void run();
void runFrame();
void resume(); // Resume the emulator
void pause(); // Pause the emulator
bool loadROM(const std::filesystem::path& path);
bool loadNCSD(const std::filesystem::path& path, ROMType type);
bool loadELF(const std::filesystem::path& path);