parent
53fb4ac616
commit
38a687eed8
|
@ -35,6 +35,7 @@ static u32 cheatsCurrentGet = 0;
|
|||
|
||||
static u8 *cheatsStack = NULL;
|
||||
static u16 cheatsNumStack = 0;
|
||||
static bool cheatsDisabled = false;
|
||||
|
||||
static void cheatsClear()
|
||||
{
|
||||
|
@ -710,6 +711,7 @@ void cheatsStackClear()
|
|||
|
||||
void cheatsProcess()
|
||||
{
|
||||
if (cheatsDisabled) return;
|
||||
if (!cheatsNum) return;
|
||||
for (int i = 0; i < cheatsNum; i++)
|
||||
{
|
||||
|
@ -756,6 +758,11 @@ void cheatGetXXcodeString(CHEATS_LIST cheat, char *res_buf)
|
|||
}
|
||||
}
|
||||
|
||||
void cheatsDisable(bool disable)
|
||||
{
|
||||
cheatsDisabled = disable;
|
||||
}
|
||||
|
||||
// ========================================== search
|
||||
u8 *searchStatMem = NULL;
|
||||
u8 *searchMem = NULL;
|
||||
|
|
|
@ -60,6 +60,7 @@ extern BOOL cheatsPop();
|
|||
extern void cheatsStackClear();
|
||||
extern void cheatsProcess();
|
||||
extern void cheatGetXXcodeString(CHEATS_LIST cheat, char *res_buf);
|
||||
extern void cheatsDisable(bool disable);
|
||||
|
||||
// ==================================================== cheat search
|
||||
extern void cheatsSearchInit(u8 type, u8 size, u8 sign);
|
||||
|
|
|
@ -68,6 +68,7 @@
|
|||
#include "throttle.h"
|
||||
#include "gbaslot_config.h"
|
||||
#include "cheatsWin.h"
|
||||
#include "../cheatSystem.h"
|
||||
#include "Mmsystem.h"
|
||||
#include "../mic.h"
|
||||
#include "../common.h"
|
||||
|
@ -160,6 +161,7 @@ const unsigned int clearid = IDM_RECENT_RESERVED0; // ID for the Clear recent
|
|||
const unsigned int baseid = IDM_RECENT_RESERVED1; //Base identifier for the recent ROMs items
|
||||
static HMENU recentromsmenu; //Handle to the recent ROMs submenu
|
||||
//--------------------------------------
|
||||
static bool _cheatsDisabled = false;
|
||||
|
||||
void UpdateHotkeyAssignments(); //Appends hotkey mappings to corresponding menu items
|
||||
|
||||
|
@ -2145,6 +2147,8 @@ int _main()
|
|||
GetSystemInfo(&systemInfo);
|
||||
CommonSettings.num_cores = systemInfo.dwNumberOfProcessors;
|
||||
|
||||
_cheatsDisabled = false;
|
||||
|
||||
char text[80];
|
||||
|
||||
GetINIPath();
|
||||
|
@ -4602,6 +4606,13 @@ LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM
|
|||
case IDM_CHEATS_SEARCH:
|
||||
CheatsSearchDialog(hwnd);
|
||||
return 0;
|
||||
|
||||
case IDM_CHEATS_DISABLE:
|
||||
_cheatsDisabled = !_cheatsDisabled;
|
||||
cheatsDisable(_cheatsDisabled);
|
||||
MainWindow->checkMenu(IDM_CHEATS_DISABLE, _cheatsDisabled );
|
||||
return 0;
|
||||
|
||||
case IDM_RECORD_MOVIE:
|
||||
MovieRecordTo();
|
||||
return 0;
|
||||
|
|
|
@ -710,7 +710,6 @@
|
|||
#define IDM_GBASLOT 40042
|
||||
#define IDM_CHEATS_LIST 40050
|
||||
#define IDC_BGMAP_ROTSCALEPARAMS 40051
|
||||
#define IDM_CHEATS_SEARCH 40051
|
||||
#define IDC_BGMAP_ROTSCALE 40052
|
||||
#define IDM_SHUT_UP 40053
|
||||
#define IDC_WINDOW2_5X 40054
|
||||
|
@ -721,6 +720,8 @@
|
|||
#define ID_LCDS_NOSWAP 40059
|
||||
#define ID_LCDS_MAINGPU 40060
|
||||
#define ID_LCDS_SUBGPU 40061
|
||||
#define IDM_CHEATS_DISABLE 40062
|
||||
#define IDM_CHEATS_SEARCH 40063
|
||||
#define IDC_LABEL_UP 50000
|
||||
#define IDC_LABEL_RIGHT 50001
|
||||
#define IDC_LABEL_LEFT 50002
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue