GTK+: Allow disconnecting controller port 2.

This commit is contained in:
Brandon Wright 2018-12-12 16:40:31 -06:00
parent c9a8b28d18
commit ba55d8c763
2 changed files with 16 additions and 0 deletions

View File

@ -543,6 +543,11 @@ event_port (GtkWidget *widget, gpointer data)
{
S9xSetController (1, CTL_MP5, 1, 2, 3, 4);
}
else if (!strcasecmp (name, "nothingpluggedin2"))
{
S9xSetController (1, CTL_NONE, 0, 0, 0, 0);
}
}
Snes9xWindow::Snes9xWindow (Snes9xConfig *config) :

View File

@ -1878,6 +1878,17 @@
<signal name="activate" handler="on_port_activate" swapped="no"/>
</object>
</child>
<child>
<object class="GtkRadioMenuItem" id="nothingpluggedin2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">None</property>
<property name="use_underline">True</property>
<property name="active">True</property>
<property name="group">joypad2</property>
<signal name="activate" handler="on_port_activate" swapped="no"/>
</object>
</child>
</object>
</child>
</object>