From 94c006efd23b34fea37a4653c5b9ba58c69d6ec6 Mon Sep 17 00:00:00 2001 From: arcum42 Date: Sun, 3 May 2009 11:09:15 +0000 Subject: [PATCH] ZeroPad: Apply the multiple key patch in issue 197 to ZeroPad. Currently Linux only. git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1125 96395faa-99c1-11dd-bbfe-3dabce05a288 --- plugins/zeropad/Linux/callbacks.h | 20 +++-- plugins/zeropad/Linux/interface.c | 90 +++++++++++++++++++ plugins/zeropad/Linux/linux.cpp | 129 ++++++++++++++-------------- plugins/zeropad/Linux/zeropad.glade | 43 ++++++++++ plugins/zeropad/Windows/win.cpp | 30 ++----- plugins/zeropad/zeropad.cpp | 47 +++++----- plugins/zeropad/zeropad.h | 12 ++- 7 files changed, 258 insertions(+), 113 deletions(-) diff --git a/plugins/zeropad/Linux/callbacks.h b/plugins/zeropad/Linux/callbacks.h index cb64e16292..d9c6d64ae1 100644 --- a/plugins/zeropad/Linux/callbacks.h +++ b/plugins/zeropad/Linux/callbacks.h @@ -10,21 +10,21 @@ OnConf_Pad2 (GtkButton *button, gpointer user_data); void -OnConf_Key (GtkButton *button, +OnConf_Pad3 (GtkButton *button, gpointer user_data); void -OnConf_Cancel (GtkButton *button, - gpointer user_data); - -void -OnConf_Ok (GtkButton *button, +OnConf_Pad4 (GtkButton *button, gpointer user_data); void on_joydevicescombo_changed (GtkComboBox *combobox, gpointer user_data); +void +OnConf_Key (GtkButton *button, + gpointer user_data); + void on_checkbutton_reverselx_toggled (GtkToggleButton *togglebutton, gpointer user_data); @@ -44,3 +44,11 @@ on_checkbutton_reversery_toggled (GtkToggleButton *togglebutton, void on_forcefeedback_toggled (GtkToggleButton *togglebutton, gpointer user_data); + +void +OnConf_Cancel (GtkButton *button, + gpointer user_data); + +void +OnConf_Ok (GtkButton *button, + gpointer user_data); diff --git a/plugins/zeropad/Linux/interface.c b/plugins/zeropad/Linux/interface.c index ffd4261e65..7b32fe1606 100644 --- a/plugins/zeropad/Linux/interface.c +++ b/plugins/zeropad/Linux/interface.c @@ -42,6 +42,8 @@ create_About (void) gchar *translators = _("translator-credits"); About = gtk_about_dialog_new (); + gtk_widget_set_name (About, "About"); + gtk_container_set_border_width (GTK_CONTAINER (About), 5); gtk_about_dialog_set_version (GTK_ABOUT_DIALOG (About), VERSION); gtk_about_dialog_set_name (GTK_ABOUT_DIALOG (About), _("ZeroPAD")); gtk_about_dialog_set_authors (GTK_ABOUT_DIALOG (About), authors); @@ -65,6 +67,8 @@ create_Conf (void) GtkWidget *PAD1; GSList *PAD1_group = NULL; GtkWidget *PAD2; + GtkWidget *PAD3; + GtkWidget *PAD4; GtkWidget *label2; GtkWidget *vbox2; GtkWidget *label5; @@ -123,30 +127,37 @@ create_Conf (void) GtkWidget *okbutton1; Conf = gtk_dialog_new (); + gtk_widget_set_name (Conf, "Conf"); gtk_window_set_title (GTK_WINDOW (Conf), _("ZeroPAD Configuration Dialog")); gtk_window_set_type_hint (GTK_WINDOW (Conf), GDK_WINDOW_TYPE_HINT_DIALOG); dialog_vbox1 = GTK_DIALOG (Conf)->vbox; + gtk_widget_set_name (dialog_vbox1, "dialog_vbox1"); gtk_widget_show (dialog_vbox1); vbox1 = gtk_vbox_new (FALSE, 0); + gtk_widget_set_name (vbox1, "vbox1"); gtk_widget_show (vbox1); gtk_box_pack_start (GTK_BOX (dialog_vbox1), vbox1, TRUE, TRUE, 0); frame1 = gtk_frame_new (NULL); + gtk_widget_set_name (frame1, "frame1"); gtk_widget_show (frame1); gtk_box_pack_start (GTK_BOX (vbox1), frame1, FALSE, FALSE, 0); alignment1 = gtk_alignment_new (0.5, 0.5, 1, 1); + gtk_widget_set_name (alignment1, "alignment1"); gtk_widget_show (alignment1); gtk_container_add (GTK_CONTAINER (frame1), alignment1); gtk_alignment_set_padding (GTK_ALIGNMENT (alignment1), 0, 0, 12, 0); hbox1 = gtk_hbox_new (FALSE, 0); + gtk_widget_set_name (hbox1, "hbox1"); gtk_widget_show (hbox1); gtk_container_add (GTK_CONTAINER (alignment1), hbox1); PAD1 = gtk_radio_button_new_with_mnemonic (NULL, _("PAD1")); + gtk_widget_set_name (PAD1, "PAD1"); gtk_widget_show (PAD1); gtk_box_pack_start (GTK_BOX (hbox1), PAD1, FALSE, FALSE, 0); gtk_radio_button_set_group (GTK_RADIO_BUTTON (PAD1), PAD1_group); @@ -154,33 +165,54 @@ create_Conf (void) gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (PAD1), TRUE); PAD2 = gtk_radio_button_new_with_mnemonic (NULL, _("PAD2")); + gtk_widget_set_name (PAD2, "PAD2"); gtk_widget_show (PAD2); gtk_box_pack_start (GTK_BOX (hbox1), PAD2, FALSE, FALSE, 0); gtk_radio_button_set_group (GTK_RADIO_BUTTON (PAD2), PAD1_group); PAD1_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (PAD2)); + PAD3 = gtk_radio_button_new_with_mnemonic (NULL, _("PAD1 alt.")); + gtk_widget_set_name (PAD3, "PAD3"); + gtk_widget_show (PAD3); + gtk_box_pack_start (GTK_BOX (hbox1), PAD3, FALSE, FALSE, 0); + gtk_radio_button_set_group (GTK_RADIO_BUTTON (PAD3), PAD1_group); + PAD1_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (PAD3)); + + PAD4 = gtk_radio_button_new_with_mnemonic (NULL, _("PAD2 alt.")); + gtk_widget_set_name (PAD4, "PAD4"); + gtk_widget_show (PAD4); + gtk_box_pack_start (GTK_BOX (hbox1), PAD4, FALSE, FALSE, 0); + gtk_radio_button_set_group (GTK_RADIO_BUTTON (PAD4), PAD1_group); + PAD1_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (PAD4)); + label2 = gtk_label_new (_("Choose PAD to modify")); + gtk_widget_set_name (label2, "label2"); gtk_widget_show (label2); gtk_frame_set_label_widget (GTK_FRAME (frame1), label2); gtk_label_set_use_markup (GTK_LABEL (label2), TRUE); vbox2 = gtk_vbox_new (FALSE, 0); + gtk_widget_set_name (vbox2, "vbox2"); gtk_widget_show (vbox2); gtk_box_pack_start (GTK_BOX (vbox1), vbox2, TRUE, TRUE, 0); label5 = gtk_label_new (_("Joystick to use for this PAD")); + gtk_widget_set_name (label5, "label5"); gtk_widget_show (label5); gtk_box_pack_start (GTK_BOX (vbox2), label5, FALSE, FALSE, 0); joydevicescombo = gtk_combo_box_entry_new_text (); + gtk_widget_set_name (joydevicescombo, "joydevicescombo"); gtk_widget_show (joydevicescombo); gtk_box_pack_start (GTK_BOX (vbox2), joydevicescombo, TRUE, TRUE, 0); fixed1 = gtk_fixed_new (); + gtk_widget_set_name (fixed1, "fixed1"); gtk_widget_show (fixed1); gtk_box_pack_start (GTK_BOX (vbox1), fixed1, TRUE, TRUE, 0); eL2 = gtk_entry_new (); + gtk_widget_set_name (eL2, "eL2"); gtk_widget_show (eL2); gtk_fixed_put (GTK_FIXED (fixed1), eL2, 64, 40); gtk_widget_set_size_request (eL2, 64, 24); @@ -188,12 +220,14 @@ create_Conf (void) gtk_entry_set_invisible_char (GTK_ENTRY (eL2), 8226); eL1 = gtk_entry_new (); + gtk_widget_set_name (eL1, "eL1"); gtk_widget_show (eL1); gtk_fixed_put (GTK_FIXED (fixed1), eL1, 64, 104); gtk_widget_set_size_request (eL1, 64, 24); gtk_entry_set_invisible_char (GTK_ENTRY (eL1), 8226); eSelect = gtk_entry_new (); + gtk_widget_set_name (eSelect, "eSelect"); gtk_widget_show (eSelect); gtk_fixed_put (GTK_FIXED (fixed1), eSelect, 168, 64); gtk_widget_set_size_request (eSelect, 64, 24); @@ -201,6 +235,7 @@ create_Conf (void) gtk_entry_set_invisible_char (GTK_ENTRY (eSelect), 8226); eStart = gtk_entry_new (); + gtk_widget_set_name (eStart, "eStart"); gtk_widget_show (eStart); gtk_fixed_put (GTK_FIXED (fixed1), eStart, 280, 64); gtk_widget_set_size_request (eStart, 64, 24); @@ -208,12 +243,14 @@ create_Conf (void) gtk_entry_set_invisible_char (GTK_ENTRY (eStart), 8226); eUp = gtk_entry_new (); + gtk_widget_set_name (eUp, "eUp"); gtk_widget_show (eUp); gtk_fixed_put (GTK_FIXED (fixed1), eUp, 64, 168); gtk_widget_set_size_request (eUp, 64, 24); gtk_entry_set_invisible_char (GTK_ENTRY (eUp), 8226); eRight = gtk_entry_new (); + gtk_widget_set_name (eRight, "eRight"); gtk_widget_show (eRight); gtk_fixed_put (GTK_FIXED (fixed1), eRight, 128, 208); gtk_widget_set_size_request (eRight, 64, 24); @@ -221,6 +258,7 @@ create_Conf (void) gtk_entry_set_invisible_char (GTK_ENTRY (eRight), 8226); eLeft = gtk_entry_new (); + gtk_widget_set_name (eLeft, "eLeft"); gtk_widget_show (eLeft); gtk_fixed_put (GTK_FIXED (fixed1), eLeft, 0, 208); gtk_widget_set_size_request (eLeft, 64, 24); @@ -228,6 +266,7 @@ create_Conf (void) gtk_entry_set_invisible_char (GTK_ENTRY (eLeft), 8226); eDown = gtk_entry_new (); + gtk_widget_set_name (eDown, "eDown"); gtk_widget_show (eDown); gtk_fixed_put (GTK_FIXED (fixed1), eDown, 64, 256); gtk_widget_set_size_request (eDown, 64, 24); @@ -235,6 +274,7 @@ create_Conf (void) gtk_entry_set_invisible_char (GTK_ENTRY (eDown), 8226); eR2 = gtk_entry_new (); + gtk_widget_set_name (eR2, "eR2"); gtk_widget_show (eR2); gtk_fixed_put (GTK_FIXED (fixed1), eR2, 368, 32); gtk_widget_set_size_request (eR2, 64, 24); @@ -242,6 +282,7 @@ create_Conf (void) gtk_entry_set_invisible_char (GTK_ENTRY (eR2), 8226); eR1 = gtk_entry_new (); + gtk_widget_set_name (eR1, "eR1"); gtk_widget_show (eR1); gtk_fixed_put (GTK_FIXED (fixed1), eR1, 368, 104); gtk_widget_set_size_request (eR1, 64, 24); @@ -249,6 +290,7 @@ create_Conf (void) gtk_entry_set_invisible_char (GTK_ENTRY (eR1), 8226); eAnalog = gtk_entry_new (); + gtk_widget_set_name (eAnalog, "eAnalog"); gtk_widget_show (eAnalog); gtk_fixed_put (GTK_FIXED (fixed1), eAnalog, 224, 128); gtk_widget_set_size_request (eAnalog, 64, 24); @@ -256,6 +298,7 @@ create_Conf (void) gtk_entry_set_invisible_char (GTK_ENTRY (eAnalog), 8226); eSquare = gtk_entry_new (); + gtk_widget_set_name (eSquare, "eSquare"); gtk_widget_show (eSquare); gtk_fixed_put (GTK_FIXED (fixed1), eSquare, 304, 208); gtk_widget_set_size_request (eSquare, 64, 24); @@ -263,6 +306,7 @@ create_Conf (void) gtk_entry_set_invisible_char (GTK_ENTRY (eSquare), 8226); eTriangle = gtk_entry_new (); + gtk_widget_set_name (eTriangle, "eTriangle"); gtk_widget_show (eTriangle); gtk_fixed_put (GTK_FIXED (fixed1), eTriangle, 368, 168); gtk_widget_set_size_request (eTriangle, 64, 24); @@ -270,6 +314,7 @@ create_Conf (void) gtk_entry_set_invisible_char (GTK_ENTRY (eTriangle), 8226); eCircle = gtk_entry_new (); + gtk_widget_set_name (eCircle, "eCircle"); gtk_widget_show (eCircle); gtk_fixed_put (GTK_FIXED (fixed1), eCircle, 432, 208); gtk_widget_set_size_request (eCircle, 64, 24); @@ -277,6 +322,7 @@ create_Conf (void) gtk_entry_set_invisible_char (GTK_ENTRY (eCircle), 8226); eCross = gtk_entry_new (); + gtk_widget_set_name (eCross, "eCross"); gtk_widget_show (eCross); gtk_fixed_put (GTK_FIXED (fixed1), eCross, 368, 256); gtk_widget_set_size_request (eCross, 64, 24); @@ -284,6 +330,7 @@ create_Conf (void) gtk_entry_set_invisible_char (GTK_ENTRY (eCross), 8226); eR3 = gtk_entry_new (); + gtk_widget_set_name (eR3, "eR3"); gtk_widget_show (eR3); gtk_fixed_put (GTK_FIXED (fixed1), eR3, 272, 272); gtk_widget_set_size_request (eR3, 64, 24); @@ -291,6 +338,7 @@ create_Conf (void) gtk_entry_set_invisible_char (GTK_ENTRY (eR3), 8226); eL3 = gtk_entry_new (); + gtk_widget_set_name (eL3, "eL3"); gtk_widget_show (eL3); gtk_fixed_put (GTK_FIXED (fixed1), eL3, 176, 272); gtk_widget_set_size_request (eL3, 64, 24); @@ -298,6 +346,7 @@ create_Conf (void) gtk_entry_set_invisible_char (GTK_ENTRY (eL3), 8226); eRx = gtk_entry_new (); + gtk_widget_set_name (eRx, "eRx"); gtk_widget_show (eRx); gtk_fixed_put (GTK_FIXED (fixed1), eRx, 272, 352); gtk_widget_set_size_request (eRx, 80, 24); @@ -305,6 +354,7 @@ create_Conf (void) gtk_entry_set_invisible_char (GTK_ENTRY (eRx), 8226); eLx = gtk_entry_new (); + gtk_widget_set_name (eLx, "eLx"); gtk_widget_show (eLx); gtk_fixed_put (GTK_FIXED (fixed1), eLx, 160, 352); gtk_widget_set_size_request (eLx, 80, 24); @@ -312,6 +362,7 @@ create_Conf (void) gtk_entry_set_invisible_char (GTK_ENTRY (eLx), 8226); eRy = gtk_entry_new (); + gtk_widget_set_name (eRy, "eRy"); gtk_widget_show (eRy); gtk_fixed_put (GTK_FIXED (fixed1), eRy, 272, 416); gtk_widget_set_size_request (eRy, 80, 24); @@ -319,6 +370,7 @@ create_Conf (void) gtk_entry_set_invisible_char (GTK_ENTRY (eRy), 8226); eLy = gtk_entry_new (); + gtk_widget_set_name (eLy, "eLy"); gtk_widget_show (eLy); gtk_fixed_put (GTK_FIXED (fixed1), eLy, 160, 416); gtk_widget_set_size_request (eLy, 80, 24); @@ -326,151 +378,181 @@ create_Conf (void) gtk_entry_set_invisible_char (GTK_ENTRY (eLy), 8226); Select = gtk_button_new_with_mnemonic (_("Select")); + gtk_widget_set_name (Select, "Select"); gtk_widget_show (Select); gtk_fixed_put (GTK_FIXED (fixed1), Select, 168, 32); gtk_widget_set_size_request (Select, 64, 32); L1 = gtk_button_new_with_mnemonic (_("L1")); + gtk_widget_set_name (L1, "L1"); gtk_widget_show (L1); gtk_fixed_put (GTK_FIXED (fixed1), L1, 64, 72); gtk_widget_set_size_request (L1, 64, 32); Left = gtk_button_new_with_mnemonic (_("Left")); + gtk_widget_set_name (Left, "Left"); gtk_widget_show (Left); gtk_fixed_put (GTK_FIXED (fixed1), Left, 0, 176); gtk_widget_set_size_request (Left, 64, 32); Down = gtk_button_new_with_mnemonic (_("Down")); + gtk_widget_set_name (Down, "Down"); gtk_widget_show (Down); gtk_fixed_put (GTK_FIXED (fixed1), Down, 64, 224); gtk_widget_set_size_request (Down, 64, 32); Analog = gtk_button_new_with_mnemonic (_("Analog")); + gtk_widget_set_name (Analog, "Analog"); gtk_widget_show (Analog); gtk_fixed_put (GTK_FIXED (fixed1), Analog, 224, 96); gtk_widget_set_size_request (Analog, 64, 32); R2 = gtk_button_new_with_mnemonic (_("R2")); + gtk_widget_set_name (R2, "R2"); gtk_widget_show (R2); gtk_fixed_put (GTK_FIXED (fixed1), R2, 368, 0); gtk_widget_set_size_request (R2, 64, 32); Start = gtk_button_new_with_mnemonic (_("Start")); + gtk_widget_set_name (Start, "Start"); gtk_widget_show (Start); gtk_fixed_put (GTK_FIXED (fixed1), Start, 280, 32); gtk_widget_set_size_request (Start, 64, 32); R1 = gtk_button_new_with_mnemonic (_("R1")); + gtk_widget_set_name (R1, "R1"); gtk_widget_show (R1); gtk_fixed_put (GTK_FIXED (fixed1), R1, 368, 72); gtk_widget_set_size_request (R1, 64, 32); Cross = gtk_button_new_with_mnemonic (_("Cross")); + gtk_widget_set_name (Cross, "Cross"); gtk_widget_show (Cross); gtk_fixed_put (GTK_FIXED (fixed1), Cross, 368, 224); gtk_widget_set_size_request (Cross, 64, 32); Triangle = gtk_button_new_with_mnemonic (_("Triangle")); + gtk_widget_set_name (Triangle, "Triangle"); gtk_widget_show (Triangle); gtk_fixed_put (GTK_FIXED (fixed1), Triangle, 368, 136); gtk_widget_set_size_request (Triangle, 64, 32); Circle = gtk_button_new_with_mnemonic (_("Circle")); + gtk_widget_set_name (Circle, "Circle"); gtk_widget_show (Circle); gtk_fixed_put (GTK_FIXED (fixed1), Circle, 432, 176); gtk_widget_set_size_request (Circle, 64, 32); Square = gtk_button_new_with_mnemonic (_("Square")); + gtk_widget_set_name (Square, "Square"); gtk_widget_show (Square); gtk_fixed_put (GTK_FIXED (fixed1), Square, 304, 176); gtk_widget_set_size_request (Square, 64, 32); L3 = gtk_button_new_with_mnemonic (_("L3")); + gtk_widget_set_name (L3, "L3"); gtk_widget_show (L3); gtk_fixed_put (GTK_FIXED (fixed1), L3, 176, 240); gtk_widget_set_size_request (L3, 64, 32); Up = gtk_button_new_with_mnemonic (_("Up")); + gtk_widget_set_name (Up, "Up"); gtk_widget_show (Up); gtk_fixed_put (GTK_FIXED (fixed1), Up, 64, 136); gtk_widget_set_size_request (Up, 64, 32); L2 = gtk_button_new_with_mnemonic (_("L2")); + gtk_widget_set_name (L2, "L2"); gtk_widget_show (L2); gtk_fixed_put (GTK_FIXED (fixed1), L2, 64, 8); gtk_widget_set_size_request (L2, 64, 32); Lx = gtk_button_new_with_mnemonic (_("Lx")); + gtk_widget_set_name (Lx, "Lx"); gtk_widget_show (Lx); gtk_fixed_put (GTK_FIXED (fixed1), Lx, 160, 320); gtk_widget_set_size_request (Lx, 80, 32); Ly = gtk_button_new_with_mnemonic (_("Ly")); + gtk_widget_set_name (Ly, "Ly"); gtk_widget_show (Ly); gtk_fixed_put (GTK_FIXED (fixed1), Ly, 160, 384); gtk_widget_set_size_request (Ly, 80, 32); Rx = gtk_button_new_with_mnemonic (_("Rx")); + gtk_widget_set_name (Rx, "Rx"); gtk_widget_show (Rx); gtk_fixed_put (GTK_FIXED (fixed1), Rx, 272, 320); gtk_widget_set_size_request (Rx, 80, 32); Ry = gtk_button_new_with_mnemonic (_("Ry")); + gtk_widget_set_name (Ry, "Ry"); gtk_widget_show (Ry); gtk_fixed_put (GTK_FIXED (fixed1), Ry, 272, 384); gtk_widget_set_size_request (Ry, 80, 32); Right = gtk_button_new_with_mnemonic (_("Right")); + gtk_widget_set_name (Right, "Right"); gtk_widget_show (Right); gtk_fixed_put (GTK_FIXED (fixed1), Right, 128, 176); gtk_widget_set_size_request (Right, 64, 32); label3 = gtk_label_new (_("Analog Controls (move mouse or analog joystick to select)")); + gtk_widget_set_name (label3, "label3"); gtk_widget_show (label3); gtk_fixed_put (GTK_FIXED (fixed1), label3, 48, 296); gtk_widget_set_size_request (label3, 408, 16); gtk_label_set_single_line_mode (GTK_LABEL (label3), TRUE); R3 = gtk_button_new_with_mnemonic (_("R3")); + gtk_widget_set_name (R3, "R3"); gtk_widget_show (R3); gtk_fixed_put (GTK_FIXED (fixed1), R3, 272, 240); gtk_widget_set_size_request (R3, 64, 32); checkbutton_reverselx = gtk_check_button_new_with_mnemonic (_("Reverse LX")); + gtk_widget_set_name (checkbutton_reverselx, "checkbutton_reverselx"); gtk_widget_show (checkbutton_reverselx); gtk_fixed_put (GTK_FIXED (fixed1), checkbutton_reverselx, 16, 328); gtk_widget_set_size_request (checkbutton_reverselx, 111, 22); checkbutton_reversely = gtk_check_button_new_with_mnemonic (_("Reverse LY")); + gtk_widget_set_name (checkbutton_reversely, "checkbutton_reversely"); gtk_widget_show (checkbutton_reversely); gtk_fixed_put (GTK_FIXED (fixed1), checkbutton_reversely, 16, 352); gtk_widget_set_size_request (checkbutton_reversely, 111, 22); checkbutton_reverserx = gtk_check_button_new_with_mnemonic (_("Reverse RX")); + gtk_widget_set_name (checkbutton_reverserx, "checkbutton_reverserx"); gtk_widget_show (checkbutton_reverserx); gtk_fixed_put (GTK_FIXED (fixed1), checkbutton_reverserx, 16, 376); gtk_widget_set_size_request (checkbutton_reverserx, 111, 22); checkbutton_reversery = gtk_check_button_new_with_mnemonic (_("Reverse RY")); + gtk_widget_set_name (checkbutton_reversery, "checkbutton_reversery"); gtk_widget_show (checkbutton_reversery); gtk_fixed_put (GTK_FIXED (fixed1), checkbutton_reversery, 16, 400); gtk_widget_set_size_request (checkbutton_reversery, 111, 22); forcefeedback = gtk_check_button_new_with_mnemonic (_("Enable Force\nFeedback")); + gtk_widget_set_name (forcefeedback, "forcefeedback"); gtk_widget_show (forcefeedback); gtk_fixed_put (GTK_FIXED (fixed1), forcefeedback, 384, 320); gtk_widget_set_size_request (forcefeedback, 112, 48); dialog_action_area1 = GTK_DIALOG (Conf)->action_area; + gtk_widget_set_name (dialog_action_area1, "dialog_action_area1"); gtk_widget_show (dialog_action_area1); gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area1), GTK_BUTTONBOX_END); cancelbutton1 = gtk_button_new_from_stock ("gtk-cancel"); + gtk_widget_set_name (cancelbutton1, "cancelbutton1"); gtk_widget_show (cancelbutton1); gtk_dialog_add_action_widget (GTK_DIALOG (Conf), cancelbutton1, GTK_RESPONSE_CANCEL); GTK_WIDGET_SET_FLAGS (cancelbutton1, GTK_CAN_DEFAULT); okbutton1 = gtk_button_new_from_stock ("gtk-ok"); + gtk_widget_set_name (okbutton1, "okbutton1"); gtk_widget_show (okbutton1); gtk_dialog_add_action_widget (GTK_DIALOG (Conf), okbutton1, GTK_RESPONSE_OK); GTK_WIDGET_SET_FLAGS (okbutton1, GTK_CAN_DEFAULT); @@ -481,6 +563,12 @@ create_Conf (void) g_signal_connect ((gpointer) PAD2, "clicked", G_CALLBACK (OnConf_Pad2), NULL); + g_signal_connect ((gpointer) PAD3, "clicked", + G_CALLBACK (OnConf_Pad3), + NULL); + g_signal_connect ((gpointer) PAD4, "clicked", + G_CALLBACK (OnConf_Pad4), + NULL); g_signal_connect ((gpointer) joydevicescombo, "changed", G_CALLBACK (on_joydevicescombo_changed), NULL); @@ -578,6 +666,8 @@ create_Conf (void) GLADE_HOOKUP_OBJECT (Conf, hbox1, "hbox1"); GLADE_HOOKUP_OBJECT (Conf, PAD1, "PAD1"); GLADE_HOOKUP_OBJECT (Conf, PAD2, "PAD2"); + GLADE_HOOKUP_OBJECT (Conf, PAD3, "PAD3"); + GLADE_HOOKUP_OBJECT (Conf, PAD4, "PAD4"); GLADE_HOOKUP_OBJECT (Conf, label2, "label2"); GLADE_HOOKUP_OBJECT (Conf, vbox2, "vbox2"); GLADE_HOOKUP_OBJECT (Conf, label5, "label5"); diff --git a/plugins/zeropad/Linux/linux.cpp b/plugins/zeropad/Linux/linux.cpp index 410c236344..2c5707deba 100644 --- a/plugins/zeropad/Linux/linux.cpp +++ b/plugins/zeropad/Linux/linux.cpp @@ -103,7 +103,7 @@ void SaveConfig() return; } - for (j=0; j<2; j++) { + for (j=0; j<2 * PADSUBKEYS; j++) { for (i=0; i= 0 && joyid < (int)s_vjoysticks.size()) { - pjoy = s_vjoysticks[joyid]; - if( SDL_JoystickGetButton((pjoy)->GetJoy(), PAD_GETJOYBUTTON(key)) ) { - status[(pjoy)->GetPAD()] &= ~(1<GetPAD()] |= (1<= 0 && joyid < (int)s_vjoysticks.size()) { + pjoy = s_vjoysticks[joyid]; + if( SDL_JoystickGetButton((pjoy)->GetJoy(), PAD_GETJOYBUTTON(key)) ) { + status[(pjoy)->GetPAD()] &= ~(1<GetPAD()] |= (1<= 0 && joyid < (int)s_vjoysticks.size()) { pjoy = s_vjoysticks[joyid]; @@ -411,10 +402,10 @@ static int s_selectedpad = 0; void UpdateConf(int pad) { - s_selectedpad = pad; + s_selectedpad = pad; int i; - GtkWidget *Btn; + GtkWidget *Btn; for (i=0; i + 5 True False ZeroPAD @@ -151,6 +152,48 @@ and SSSPSXPad, TwinPad authors False + + + + True + True + PAD1 alt. + True + GTK_RELIEF_NORMAL + True + False + False + True + PAD1 + + + + 0 + False + False + + + + + + True + True + PAD2 alt. + True + GTK_RELIEF_NORMAL + True + False + False + True + PAD1 + + + + 0 + False + False + + diff --git a/plugins/zeropad/Windows/win.cpp b/plugins/zeropad/Windows/win.cpp index ad9e47e1d8..d89aadce3b 100644 --- a/plugins/zeropad/Windows/win.cpp +++ b/plugins/zeropad/Windows/win.cpp @@ -54,7 +54,7 @@ void SaveConfig() if(!szTemp) return; strcpy(szTemp, "\\inis\\zeropad.ini"); - for (j=0; j<2; j++) { + for (j=0; j<2 * PADSUBKEYS; j++) { for (i=0; i