diff --git a/desmume/src/windows/gbaslot_config.cpp b/desmume/src/windows/gbaslot_config.cpp index c9ea41ff3..e0c393004 100644 --- a/desmume/src/windows/gbaslot_config.cpp +++ b/desmume/src/windows/gbaslot_config.cpp @@ -456,7 +456,7 @@ void GBAslotDialog(HWND hwnd) memcpy(&tmp_Guitar, &Guitar, sizeof(Guitar)); tmp_CFlashMode = CFlash_Mode; _OKbutton = false; - needReset == true; + needReset = true; u32 res=DialogBox(hAppInst, MAKEINTRESOURCE(IDD_GBASLOT), hwnd, (DLGPROC) GbaSlotBox_Proc); if (res) { @@ -485,6 +485,7 @@ void GBAslotDialog(HWND hwnd) break; case NDS_ADDON_GUITARGRIP: memcpy(&Guitar, &tmp_Guitar, sizeof(tmp_Guitar)); + Guitar.Enabled = true; WritePrivateProfileInt("GBAslot.GuitarGrip","green",Guitar.GREEN,IniName); WritePrivateProfileInt("GBAslot.GuitarGrip","red",Guitar.RED,IniName); WritePrivateProfileInt("GBAslot.GuitarGrip","yellow",Guitar.YELLOW,IniName); @@ -493,6 +494,8 @@ void GBAslotDialog(HWND hwnd) default: return; } + if (temp_type!=NDS_ADDON_GUITARGRIP) + Guitar.Enabled = false; WritePrivateProfileInt("GBAslot","type",temp_type,IniName); addon_type = temp_type; diff --git a/desmume/src/windows/inputdx.cpp b/desmume/src/windows/inputdx.cpp index d98981aea..ab1c3e34b 100644 --- a/desmume/src/windows/inputdx.cpp +++ b/desmume/src/windows/inputdx.cpp @@ -241,7 +241,7 @@ SJoypad DefaultJoypad[16] = { SJoypad Joypad[16]; -SGuitar DefaultGuitar = { true, 'E', 'R', 'T', 'Y' }; +SGuitar DefaultGuitar = { false, 'E', 'R', 'T', 'Y' }; SGuitar Guitar; u8 guitarState = 0; @@ -389,7 +389,7 @@ static void LoadGuitarConfig() { memcpy(&Guitar,&DefaultGuitar,sizeof(Guitar)); - Guitar.Enabled = true; + //Guitar.Enabled = true; #define DO(X) ReadControl(#X,Guitar.X); DO(GREEN); DO(RED); diff --git a/desmume/src/windows/main.cpp b/desmume/src/windows/main.cpp index fb0319727..ed2ca02d7 100644 --- a/desmume/src/windows/main.cpp +++ b/desmume/src/windows/main.cpp @@ -1529,9 +1529,6 @@ int _main() CFlash_Mode = ADDON_CFLASH_MODE_RomPath; } - - - //init_configured_features( &my_config); /*if ( !fill_configured_features( &my_config, lpszArgument)) { MessageBox(NULL,"Unable to parse command line arguments","Error",MB_OK); @@ -1646,6 +1643,8 @@ int _main() void input_init(); input_init(); + if (addon_type == NDS_ADDON_GUITARGRIP) Guitar.Enabled = true; + LOG("Init NDS\n"); GInfo_Init();