summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSND\dario86_cp <SND\dario86_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2014-02-22 16:05:51 +0000
committerSND\dario86_cp <SND\dario86_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2014-02-22 16:05:51 +0000
commit64a137829a1d3523c52fd1109db910da6c58a9e6 (patch)
treecfadc41d609dbf6fc955fef7206939dcc53e864e
parentfe4b4c0f5672ba45c174b42fe3540029d9a5552a (diff)
downloadpcsxr-64a137829a1d3523c52fd1109db910da6c58a9e6.tar.gz
- bugfix: when controller is connected configuration dialog does not show up with SDL 2.0 on GNU/Linux (issue #11479).
- legal: about dialog shows GPLv2 instead of GPLv3. git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@89187 e17a0e51-4ae3-4d35-97c3-1a29b211df97
-rwxr-xr-xgui/AboutDlg.c7
-rwxr-xr-xplugins/dfinput/cfg-gtk.c21
2 files changed, 16 insertions, 12 deletions
diff --git a/gui/AboutDlg.c b/gui/AboutDlg.c
index f39daf0d..1d9962bf 100755
--- a/gui/AboutDlg.c
+++ b/gui/AboutDlg.c
@@ -74,9 +74,9 @@ void RunAboutDialog(void) {
"(C) 2009-2013 PCSX-Reloaded Team");
const gchar *license = N_(
- "This program is free software; you can redistribute it and/or modify "
+ "This program is free software: you can redistribute it and/or modify "
"it under the terms of the GNU General Public License as published by "
- "the Free Software Foundation; either version 2 of the License, or "
+ "the Free Software Foundation, either version 3 of the License, or "
"(at your option) any later version.\n"
"\n"
"This program is distributed in the hope that it will be useful, "
@@ -85,8 +85,7 @@ void RunAboutDialog(void) {
"GNU General Public License for more details.\n"
"\n"
"You should have received a copy of the GNU General Public License "
- "along with this program; if not, write to the Free Software "
- "Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.");
+ "along with this program. If not, see <http://www.gnu.org/licenses/>.");
builder = gtk_builder_new();
diff --git a/plugins/dfinput/cfg-gtk.c b/plugins/dfinput/cfg-gtk.c
index 80443f3a..eba56d8a 100755
--- a/plugins/dfinput/cfg-gtk.c
+++ b/plugins/dfinput/cfg-gtk.c
@@ -608,7 +608,12 @@ static void PopulateDevList() {
n = SDL_NumJoysticks();
for (j = 0; j < n; j++) {
- sprintf(buf, "%d: %s", j + 1, SDL_JoystickName(j));
+ #if SDL_VERSION_ATLEAST(2, 0, 0)
+ SDL_Joystick *joystick = SDL_JoystickOpen(j);
+ sprintf(buf, "%d: %s", j + 1, SDL_JoystickName(joystick));
+ #else
+ sprintf(buf, "%d: %s", j + 1, SDL_JoystickName(j));
+ #endif
gtk_list_store_append(store, &iter);
gtk_list_store_set(store, &iter, 0, buf, -1);
}
@@ -632,7 +637,7 @@ long PADconfigure() {
GtkTreeSelection *treesel;
GtkTreeViewColumn *column;
GtkCellRenderer *renderer;
-
+
if (SDL_Init(SDL_INIT_JOYSTICK) == -1) {
fprintf(stderr, "Failed to initialize SDL!\n");
return -1;
@@ -643,7 +648,7 @@ long PADconfigure() {
fprintf(stderr, "XOpenDisplay failed!\n");
return -1;
}
-
+
LoadPADConfig();
xml = gtk_builder_new();
@@ -652,12 +657,12 @@ long PADconfigure() {
g_warning("We could not load the interface!");
return -1;
}
-
+
MainWindow = GTK_WIDGET(gtk_builder_get_object(xml, "CfgWnd"));
gtk_window_set_title(GTK_WINDOW(MainWindow), _("Gamepad/Keyboard Input Configuration"));
widget = GTK_WIDGET(gtk_builder_get_object(xml, widgetname_treeview[1])); // pad 1
-
+
// column for key
renderer = gtk_cell_renderer_text_new();
column = gtk_tree_view_column_new_with_attributes(_("Key"),
@@ -815,13 +820,13 @@ long PADconfigure() {
widget = GTK_WIDGET(gtk_builder_get_object(xml, widgetname_combodev[0]));
g_signal_connect_data(G_OBJECT(widget), "changed",
G_CALLBACK(OnDeviceChanged), GINT_TO_POINTER(-1), NULL, G_CONNECT_AFTER);
-
+
PopulateDevList();
UpdateKeyList();
-
+
gtk_widget_show(MainWindow);
gtk_main();
-
+
return 0;
}