Introduce 2 methods of resetting the emulator; with and without reload

This commit is contained in:
wheremyfoodat 2023-07-11 16:17:36 +03:00
parent effc9543b3
commit b352309290
2 changed files with 13 additions and 6 deletions

View file

@ -61,12 +61,18 @@ class Emulator {
std::optional<std::filesystem::path> romPath = std::nullopt;
public:
// Decides whether to reload or not reload the ROM when resetting. We use enum class over a plain bool for clarity.
// If NoReload is selected, the emulator will not reload its selected ROM. This is useful for things like booting up the emulator, or resetting to
// change ROMs. If Reload is selected, the emulator will reload its selected ROM. This is useful for eg a "reset" button that keeps the current ROM
// and just resets the emu
enum class ReloadOption { NoReload, Reload };
Emulator();
~Emulator();
void step();
void render();
void reset();
void reset(ReloadOption reload);
void run();
void runFrame();