mirror of
https://github.com/dborth/snes9xgx.git
synced 2024-12-25 18:51:50 +01:00
Add mouse toggle to menu
This commit is contained in:
parent
9f3a75e134
commit
301108bfdd
@ -617,10 +617,11 @@ ConfigureButtons (u16 ctrlr_type)
|
|||||||
menu = oldmenu;
|
menu = oldmenu;
|
||||||
} // end configurebuttons()
|
} // end configurebuttons()
|
||||||
|
|
||||||
int ctlrmenucount = 8;
|
int ctlrmenucount = 9;
|
||||||
char ctlrmenu[][50] = {
|
char ctlrmenu[][50] = {
|
||||||
"MultiTap",
|
"MultiTap",
|
||||||
"SuperScope",
|
"SuperScope",
|
||||||
|
"Mouse",
|
||||||
"Nunchuk",
|
"Nunchuk",
|
||||||
"Classic Controller",
|
"Classic Controller",
|
||||||
"Gamecube Pad",
|
"Gamecube Pad",
|
||||||
@ -653,6 +654,11 @@ ConfigureControllers ()
|
|||||||
else
|
else
|
||||||
sprintf (ctlrmenu[1], "Superscope OFF");
|
sprintf (ctlrmenu[1], "Superscope OFF");
|
||||||
|
|
||||||
|
if (GCSettings.Mouse > 0)
|
||||||
|
sprintf (ctlrmenu[2], "Mouse: Pad %d", GCSettings.Mouse);
|
||||||
|
else
|
||||||
|
sprintf (ctlrmenu[2], "Mouse OFF");
|
||||||
|
|
||||||
/*** Controller Config Menu ***/
|
/*** Controller Config Menu ***/
|
||||||
ret = RunMenu (ctlrmenu, ctlrmenucount, (char*)"Configure Controllers");
|
ret = RunMenu (ctlrmenu, ctlrmenucount, (char*)"Configure Controllers");
|
||||||
|
|
||||||
@ -669,33 +675,39 @@ ConfigureControllers ()
|
|||||||
GCSettings.Superscope ++;
|
GCSettings.Superscope ++;
|
||||||
if (GCSettings.Superscope > 4)
|
if (GCSettings.Superscope > 4)
|
||||||
GCSettings.Superscope = 0;
|
GCSettings.Superscope = 0;
|
||||||
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
|
GCSettings.Mouse ++;
|
||||||
|
if (GCSettings.Mouse > 4)
|
||||||
|
GCSettings.Mouse = 0;
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
/*** Configure Nunchuk ***/
|
/*** Configure Nunchuk ***/
|
||||||
ConfigureButtons (CTRLR_NUNCHUK);
|
ConfigureButtons (CTRLR_NUNCHUK);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 3:
|
case 4:
|
||||||
/*** Configure Classic ***/
|
/*** Configure Classic ***/
|
||||||
ConfigureButtons (CTRLR_CLASSIC);
|
ConfigureButtons (CTRLR_CLASSIC);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 4:
|
case 5:
|
||||||
/*** Configure GC Pad ***/
|
/*** Configure GC Pad ***/
|
||||||
ConfigureButtons (CTRLR_GCPAD);
|
ConfigureButtons (CTRLR_GCPAD);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 5:
|
case 6:
|
||||||
/*** Configure Wiimote ***/
|
/*** Configure Wiimote ***/
|
||||||
ConfigureButtons (CTRLR_WIIMOTE);
|
ConfigureButtons (CTRLR_WIIMOTE);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 6:
|
case 7:
|
||||||
/*** Save Preferences Now ***/
|
/*** Save Preferences Now ***/
|
||||||
quickSavePrefs(NOTSILENT);
|
quickSavePrefs(NOTSILENT);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case -1: /*** Button B ***/
|
case -1: /*** Button B ***/
|
||||||
case 7:
|
case 8:
|
||||||
/*** Return ***/
|
/*** Return ***/
|
||||||
quit = 1;
|
quit = 1;
|
||||||
break;
|
break;
|
||||||
@ -806,6 +818,7 @@ mainmenu (int selectedMenu)
|
|||||||
ReInitGCVideo(); // update video after reading settings
|
ReInitGCVideo(); // update video after reading settings
|
||||||
|
|
||||||
Settings.SuperScopeMaster = (GCSettings.Superscope > 0 ? true : false); // update superscope settings
|
Settings.SuperScopeMaster = (GCSettings.Superscope > 0 ? true : false); // update superscope settings
|
||||||
|
Settings.MouseMaster = (GCSettings.Mouse > 0 ? true : false); // update mouse settings
|
||||||
// update mouse/justifier info?
|
// update mouse/justifier info?
|
||||||
SetControllers();
|
SetControllers();
|
||||||
}
|
}
|
||||||
|
@ -605,6 +605,11 @@ void SetControllers ()
|
|||||||
S9xSetController (0, CTL_JOYPAD, 0, 0, 0, 0);
|
S9xSetController (0, CTL_JOYPAD, 0, 0, 0, 0);
|
||||||
S9xSetController (1, CTL_SUPERSCOPE, 1, 0, 0, 0);
|
S9xSetController (1, CTL_SUPERSCOPE, 1, 0, 0, 0);
|
||||||
}
|
}
|
||||||
|
else if (Settings.MouseMaster == true)
|
||||||
|
{
|
||||||
|
S9xSetController (0, CTL_MOUSE, 0, 0, 0, 0);
|
||||||
|
S9xSetController (1, CTL_JOYPAD, 1, 0, 0, 0);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/*** Plugin 2 Joypads by default ***/
|
/*** Plugin 2 Joypads by default ***/
|
||||||
|
Loading…
Reference in New Issue
Block a user