mirror of https://github.com/snes9xgit/snes9x.git
GTK+: Don't override command-line port choice.
This commit is contained in:
parent
bf12c09a12
commit
602919d522
|
@ -462,6 +462,10 @@ S9xInitInputDevices (void)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
//First plug in both, they'll change later as needed
|
||||||
|
S9xSetController (0, CTL_JOYPAD, 0, 0, 0, 0);
|
||||||
|
S9xSetController (1, CTL_JOYPAD, 1, 0, 0, 0);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -86,6 +86,32 @@ main (int argc, char *argv[])
|
||||||
|
|
||||||
S9xPortSoundInit ();
|
S9xPortSoundInit ();
|
||||||
|
|
||||||
|
for (int port = 0; port < 2; port++)
|
||||||
|
{
|
||||||
|
enum controllers type;
|
||||||
|
int8 id;
|
||||||
|
S9xGetController (port, &type, &id, &id, &id, &id);
|
||||||
|
std::string device_type;
|
||||||
|
|
||||||
|
switch (type)
|
||||||
|
{
|
||||||
|
case CTL_MP5:
|
||||||
|
device_type = "multitap";
|
||||||
|
break;
|
||||||
|
case CTL_MOUSE:
|
||||||
|
device_type = "mouse";
|
||||||
|
break;
|
||||||
|
case CTL_SUPERSCOPE:
|
||||||
|
device_type = "superscope";
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
device_type = "joypad";
|
||||||
|
}
|
||||||
|
|
||||||
|
device_type += std::to_string (port + 1);
|
||||||
|
top_level->set_menu_item_selected (device_type.c_str ());
|
||||||
|
}
|
||||||
|
|
||||||
gui_config->reconfigure ();
|
gui_config->reconfigure ();
|
||||||
top_level->update_accels ();
|
top_level->update_accels ();
|
||||||
|
|
||||||
|
@ -705,12 +731,6 @@ S9xExit (void)
|
||||||
void
|
void
|
||||||
S9xPostRomInit (void)
|
S9xPostRomInit (void)
|
||||||
{
|
{
|
||||||
//First plug in both, they'll change later as needed
|
|
||||||
S9xSetController (0, CTL_JOYPAD, 0, 0, 0, 0);
|
|
||||||
S9xSetController (1, CTL_JOYPAD, 1, 0, 0, 0);
|
|
||||||
top_level->set_menu_item_selected ("joypad1");
|
|
||||||
top_level->set_menu_item_selected ("joypad2");
|
|
||||||
|
|
||||||
if (!strncmp ((const char *) Memory.NSRTHeader + 24, "NSRT", 4))
|
if (!strncmp ((const char *) Memory.NSRTHeader + 24, "NSRT", 4))
|
||||||
{
|
{
|
||||||
switch (Memory.NSRTHeader[29])
|
switch (Memory.NSRTHeader[29])
|
||||||
|
|
|
@ -562,10 +562,10 @@ event_port (GtkWidget *widget, gpointer data)
|
||||||
S9xSetController (1, CTL_SUPERSCOPE, 0, 0, 0, 0);
|
S9xSetController (1, CTL_SUPERSCOPE, 0, 0, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* else if (!strcasecmp (name, "multitap1"))
|
else if (!strcasecmp (name, "multitap1"))
|
||||||
{
|
{
|
||||||
S9xSetController (0, CTL_MP5, 0, 1, 2, 3);
|
S9xSetController (0, CTL_MP5, 0, 1, 2, 3);
|
||||||
} */
|
}
|
||||||
|
|
||||||
else if (!strcasecmp (name, "multitap2"))
|
else if (!strcasecmp (name, "multitap2"))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue