From 89478ad5999fcd26bc8f2014e8c96400d8979b34 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Mon, 24 Jun 2013 04:31:29 -0400 Subject: [PATCH] Simplify the previous commit's check a little bit. --- Core/CwCheat.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Core/CwCheat.cpp b/Core/CwCheat.cpp index c616568254..057ebec374 100644 --- a/Core/CwCheat.cpp +++ b/Core/CwCheat.cpp @@ -58,11 +58,14 @@ void __CheatShutdown() { void hleCheat(u64 userdata, int cyclesLate) { CoreTiming::ScheduleEvent(msToCycles(77), CheatEvent, 0); - if (g_Config.bReloadCheats == true && cheatEngine) { //Checks if the "reload cheats" button has been pressed. + if (!cheatEngine) + return; + + if (g_Config.bReloadCheats) { //Checks if the "reload cheats" button has been pressed. cheatEngine->CreateCodeList(); g_Config.bReloadCheats = false; } - if (g_Config.bEnableCheats && cheatEngine) { + if (g_Config.bEnableCheats) { cheatEngine->Run(); } }