winport:
- fix load a settings of GuitarGrip; - add saving a status of cheats (disabled/enabled);
This commit is contained in:
parent
52b8847c04
commit
1d7d7df7e9
|
@ -460,6 +460,7 @@ extern struct TCommonSettings {
|
||||||
, micMode(InternalNoise)
|
, micMode(InternalNoise)
|
||||||
, spuInterpolationMode(SPUInterpolation_Linear)
|
, spuInterpolationMode(SPUInterpolation_Linear)
|
||||||
, manualBackupType(0)
|
, manualBackupType(0)
|
||||||
|
, cheatsDisable(false)
|
||||||
{
|
{
|
||||||
strcpy(ARM9BIOS, "biosnds9.bin");
|
strcpy(ARM9BIOS, "biosnds9.bin");
|
||||||
strcpy(ARM7BIOS, "biosnds7.bin");
|
strcpy(ARM7BIOS, "biosnds7.bin");
|
||||||
|
@ -487,6 +488,8 @@ extern struct TCommonSettings {
|
||||||
bool DebugConsole;
|
bool DebugConsole;
|
||||||
bool EnsataEmulation;
|
bool EnsataEmulation;
|
||||||
|
|
||||||
|
bool cheatsDisable;
|
||||||
|
|
||||||
int num_cores;
|
int num_cores;
|
||||||
bool single_core() { return num_cores==1; }
|
bool single_core() { return num_cores==1; }
|
||||||
|
|
||||||
|
|
|
@ -717,7 +717,7 @@ void CHEATS::stackClear()
|
||||||
|
|
||||||
void CHEATS::process()
|
void CHEATS::process()
|
||||||
{
|
{
|
||||||
if (disabled) return;
|
if (CommonSettings.cheatsDisable) return;
|
||||||
if (!num) return;
|
if (!num) return;
|
||||||
for (int i = 0; i < num; i++)
|
for (int i = 0; i < num; i++)
|
||||||
{
|
{
|
||||||
|
@ -764,11 +764,6 @@ void CHEATS::getXXcodeString(CHEATS_LIST list, char *res_buf)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CHEATS::disable(bool disable)
|
|
||||||
{
|
|
||||||
disabled = disable;
|
|
||||||
}
|
|
||||||
|
|
||||||
// ========================================== search
|
// ========================================== search
|
||||||
BOOL CHEATSEARCH::start(u8 type, u8 size, u8 sign)
|
BOOL CHEATSEARCH::start(u8 type, u8 size, u8 sign)
|
||||||
{
|
{
|
||||||
|
|
|
@ -52,7 +52,6 @@ private:
|
||||||
|
|
||||||
u8 *stack;
|
u8 *stack;
|
||||||
u16 numStack;
|
u16 numStack;
|
||||||
bool disabled;
|
|
||||||
|
|
||||||
void clear();
|
void clear();
|
||||||
void ARparser(CHEATS_LIST cheat);
|
void ARparser(CHEATS_LIST cheat);
|
||||||
|
@ -61,7 +60,7 @@ private:
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CHEATS():
|
CHEATS():
|
||||||
num(0), currentGet(0), stack(0), numStack(0), disabled(0)
|
num(0), currentGet(0), stack(0), numStack(0)
|
||||||
{
|
{
|
||||||
memset(list, 0, sizeof(list));
|
memset(list, 0, sizeof(list));
|
||||||
memset(filename, 0, sizeof(filename));
|
memset(filename, 0, sizeof(filename));
|
||||||
|
@ -87,7 +86,6 @@ public:
|
||||||
void stackClear();
|
void stackClear();
|
||||||
void process();
|
void process();
|
||||||
void getXXcodeString(CHEATS_LIST cheat, char *res_buf);
|
void getXXcodeString(CHEATS_LIST cheat, char *res_buf);
|
||||||
void disable(bool disable);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class CHEATSEARCH
|
class CHEATSEARCH
|
||||||
|
|
|
@ -394,7 +394,7 @@ static void LoadGuitarConfig()
|
||||||
memcpy(&Guitar,&DefaultGuitar,sizeof(Guitar));
|
memcpy(&Guitar,&DefaultGuitar,sizeof(Guitar));
|
||||||
|
|
||||||
//Guitar.Enabled = true;
|
//Guitar.Enabled = true;
|
||||||
#define DO(X) ReadControl(#X,Guitar.X);
|
#define DO(X) ReadGuitarControl(#X,Guitar.X);
|
||||||
DO(GREEN);
|
DO(GREEN);
|
||||||
DO(RED);
|
DO(RED);
|
||||||
DO(YELLOW);
|
DO(YELLOW);
|
||||||
|
|
|
@ -176,8 +176,6 @@ static BOOL OpenCore(const char* filename);
|
||||||
BOOL Mic_DeInit_Physical();
|
BOOL Mic_DeInit_Physical();
|
||||||
BOOL Mic_Init_Physical();
|
BOOL Mic_Init_Physical();
|
||||||
|
|
||||||
static bool _cheatsDisabled = false;
|
|
||||||
|
|
||||||
void UpdateHotkeyAssignments(); //Appends hotkey mappings to corresponding menu items
|
void UpdateHotkeyAssignments(); //Appends hotkey mappings to corresponding menu items
|
||||||
|
|
||||||
HMENU mainMenu = NULL; //Holds handle to the main DeSmuME menu
|
HMENU mainMenu = NULL; //Holds handle to the main DeSmuME menu
|
||||||
|
@ -2298,12 +2296,12 @@ int _main()
|
||||||
GetSystemInfo(&systemInfo);
|
GetSystemInfo(&systemInfo);
|
||||||
CommonSettings.num_cores = systemInfo.dwNumberOfProcessors;
|
CommonSettings.num_cores = systemInfo.dwNumberOfProcessors;
|
||||||
|
|
||||||
_cheatsDisabled = false;
|
|
||||||
|
|
||||||
char text[80];
|
char text[80];
|
||||||
|
|
||||||
GetINIPath();
|
GetINIPath();
|
||||||
|
|
||||||
|
CommonSettings.cheatsDisable = GetPrivateProfileInt("General", "cheatsDisable", false, IniName);
|
||||||
|
|
||||||
addon_type = GetPrivateProfileInt("GBAslot", "type", NDS_ADDON_NONE, IniName);
|
addon_type = GetPrivateProfileInt("GBAslot", "type", NDS_ADDON_NONE, IniName);
|
||||||
win32_CFlash_cfgMode = GetPrivateProfileInt("GBAslot.CFlash", "fileMode", 2, IniName);
|
win32_CFlash_cfgMode = GetPrivateProfileInt("GBAslot.CFlash", "fileMode", 2, IniName);
|
||||||
win32_CFlash_cfgDirectory = GetPrivateProfileStdString("GBAslot.CFlash", "path", "");
|
win32_CFlash_cfgDirectory = GetPrivateProfileStdString("GBAslot.CFlash", "path", "");
|
||||||
|
@ -3695,6 +3693,8 @@ LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM
|
||||||
|
|
||||||
MainWindow->checkMenu(IDM_EJECTCARD, nds.cardEjected != FALSE);
|
MainWindow->checkMenu(IDM_EJECTCARD, nds.cardEjected != FALSE);
|
||||||
|
|
||||||
|
MainWindow->checkMenu(IDM_CHEATS_DISABLE, CommonSettings.cheatsDisable == true);
|
||||||
|
|
||||||
//Save type
|
//Save type
|
||||||
const int savelist[] = {IDC_SAVETYPE1,IDC_SAVETYPE2,IDC_SAVETYPE3,IDC_SAVETYPE4,IDC_SAVETYPE5,IDC_SAVETYPE6,IDC_SAVETYPE7,IDC_SAVETYPE8};
|
const int savelist[] = {IDC_SAVETYPE1,IDC_SAVETYPE2,IDC_SAVETYPE3,IDC_SAVETYPE4,IDC_SAVETYPE5,IDC_SAVETYPE6,IDC_SAVETYPE7,IDC_SAVETYPE8};
|
||||||
for(int i=0;i<8;i++)
|
for(int i=0;i<8;i++)
|
||||||
|
@ -4846,9 +4846,9 @@ DOKEYDOWN:
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
case IDM_CHEATS_DISABLE:
|
case IDM_CHEATS_DISABLE:
|
||||||
_cheatsDisabled = !_cheatsDisabled;
|
CommonSettings.cheatsDisable = !CommonSettings.cheatsDisable;
|
||||||
cheats->disable(_cheatsDisabled);
|
WritePrivateProfileBool("General", "cheatsDisable", CommonSettings.cheatsDisable, IniName);
|
||||||
MainWindow->checkMenu(IDM_CHEATS_DISABLE, _cheatsDisabled );
|
MainWindow->checkMenu(IDM_CHEATS_DISABLE, CommonSettings.cheatsDisable );
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
case IDM_RECORD_MOVIE:
|
case IDM_RECORD_MOVIE:
|
||||||
|
|
Loading…
Reference in New Issue