mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-20 20:49:12 +12:00
[Cheats] Add boilerplate
This commit is contained in:
parent
5b4f6ef46c
commit
0904638df0
5 changed files with 42 additions and 2 deletions
5
src/core/cheats.cpp
Normal file
5
src/core/cheats.cpp
Normal file
|
@ -0,0 +1,5 @@
|
|||
#include "cheats.hpp"
|
||||
|
||||
ActionReplay::ActionReplay() { reset(); }
|
||||
|
||||
void ActionReplay::reset() { cheats.clear(); }
|
|
@ -76,6 +76,12 @@ void Emulator::reset(ReloadOption reload) {
|
|||
// Otherwise resetting the kernel or cpu might nuke them
|
||||
cpu.setReg(13, VirtualAddrs::StackTop); // Set initial SP
|
||||
|
||||
// We're resetting without reloading the ROM, so yeet cheats
|
||||
if (reload == ReloadOption::NoReload) {
|
||||
haveCheats = false;
|
||||
cheats.reset();
|
||||
}
|
||||
|
||||
// If a ROM is active and we reset, with the reload option enabled then reload it.
|
||||
// This is necessary to set up stack, executable memory, .data/.rodata/.bss all over again
|
||||
if (reload == ReloadOption::Reload && romType != ROMType::None && romPath.has_value()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue