mirror of
https://github.com/citra-emu/citra.git
synced 2024-12-20 07:00:09 +00:00
Reconnect cheat_engine during load
This commit is contained in:
parent
b5f394dd12
commit
ac37de10fc
@ -18,6 +18,10 @@ constexpr u64 run_interval_ticks = BASE_CLOCK_RATE_ARM11 / 60;
|
||||
|
||||
CheatEngine::CheatEngine(Core::System& system_) : system(system_) {
|
||||
LoadCheatFile();
|
||||
Connect();
|
||||
}
|
||||
|
||||
void CheatEngine::Connect() {
|
||||
event = system.CoreTiming().RegisterEvent(
|
||||
"CheatCore::run_event",
|
||||
[this](u64 thread_id, s64 cycle_late) { RunCallback(thread_id, cycle_late); });
|
||||
|
@ -26,6 +26,7 @@ class CheatEngine {
|
||||
public:
|
||||
explicit CheatEngine(Core::System& system);
|
||||
~CheatEngine();
|
||||
void Connect();
|
||||
std::vector<std::shared_ptr<CheatBase>> GetCheats() const;
|
||||
void AddCheat(const std::shared_ptr<CheatBase>& cheat);
|
||||
void RemoveCheat(int index);
|
||||
|
@ -167,6 +167,7 @@ void System::LoadState(u32 slot) {
|
||||
auto system_mode = this->app_loader->LoadKernelSystemMode();
|
||||
auto n3ds_mode = this->app_loader->LoadKernelN3dsMode();
|
||||
Init(*m_emu_window, *system_mode.first, *n3ds_mode.first);
|
||||
cheat_engine->Connect();
|
||||
|
||||
try {
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user