mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-30 21:30:04 +00:00 
			
		
		
		
	Reconnect cheat_engine during load
This commit is contained in:
		
							parent
							
								
									b5f394dd12
								
							
						
					
					
						commit
						ac37de10fc
					
				
					 3 changed files with 6 additions and 0 deletions
				
			
		|  | @ -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…
	
	Add table
		Add a link
		
	
		Reference in a new issue