From ba55d8c76386ae510e08644ae7dacc20140a4a0f Mon Sep 17 00:00:00 2001 From: Brandon Wright Date: Wed, 12 Dec 2018 16:40:31 -0600 Subject: [PATCH] GTK+: Allow disconnecting controller port 2. --- gtk/src/gtk_s9xwindow.cpp | 5 +++++ gtk/src/snes9x.ui | 11 +++++++++++ 2 files changed, 16 insertions(+) diff --git a/gtk/src/gtk_s9xwindow.cpp b/gtk/src/gtk_s9xwindow.cpp index 7bc51d07..31ef2906 100644 --- a/gtk/src/gtk_s9xwindow.cpp +++ b/gtk/src/gtk_s9xwindow.cpp @@ -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) : diff --git a/gtk/src/snes9x.ui b/gtk/src/snes9x.ui index 9410c7b4..bab3eee1 100644 --- a/gtk/src/snes9x.ui +++ b/gtk/src/snes9x.ui @@ -1878,6 +1878,17 @@ + + + True + False + None + True + True + joypad2 + + +