diff options
| author | Xavier Del Campo Romero <xavi.dcr@tutanota.com> | 2020-06-04 23:47:45 +0200 |
|---|---|---|
| committer | Xavier Del Campo Romero <xavi.dcr@tutanota.com> | 2020-06-04 23:47:45 +0200 |
| commit | 0521d579639d32587fb8f65eb28a29d3b63be88b (patch) | |
| tree | 1b0da4268222ff9a67d61ea6de9bf2bc3ae01c48 /gui | |
| parent | 85141ac554d346cd47041a51f6e828a121c568d2 (diff) | |
| parent | 66d4b1aff798e2890b2bf355d7c0e3f546a1b06b (diff) | |
| download | pcsxr-0521d579639d32587fb8f65eb28a29d3b63be88b.tar.gz | |
Merge branch 'multisockets'
Diffstat (limited to 'gui')
| -rw-r--r-- | gui/ConfDlg.c | 15 | ||||
| -rw-r--r-- | gui/LnxMain.c | 15 | ||||
| -rw-r--r-- | gui/data/pcsxr.ui | 113 |
3 files changed, 84 insertions, 59 deletions
diff --git a/gui/ConfDlg.c b/gui/ConfDlg.c index d55234f8..f41dd9ed 100644 --- a/gui/ConfDlg.c +++ b/gui/ConfDlg.c @@ -32,6 +32,7 @@ #include "ConfDlg.h" #include "../libpcsxcore/plugins.h" +#include "../gdbstub/gdbstub_sys.h" static void OnBiosPath_Changed(GtkWidget *wdg, gpointer data); static void OnConf_Clicked(GtkDialog *dialog, gint arg1, gpointer user_data); @@ -109,7 +110,7 @@ void ConfigurePlugins() { UpdatePluginsBIOS_UpdateGUI(builder); ConfDlg = GTK_WIDGET(gtk_builder_get_object(builder, "ConfDlg")); - + gtk_window_set_title(GTK_WINDOW(ConfDlg), _("Configure PCSXR")); gtk_widget_show (ConfDlg); @@ -219,7 +220,7 @@ void OnConf_Net() { } NetDlg = GTK_WIDGET(gtk_builder_get_object(builder, "NetDlg")); - + gtk_widget_show (NetDlg); FindNetPlugin(builder); @@ -791,7 +792,7 @@ static void FindNetPlugin() { char plugin[MAXPATHLEN],name[MAXPATHLEN]; NetConfS.plugins = 0; - NetConfS.glist = NULL; + NetConfS.glist = NULL; NetConfS.plugins += 2; strcpy(NetConfS.plist[NetConfS.plugins - 1], "Disabled"); @@ -894,7 +895,7 @@ void OnCpu_Clicked(GtkDialog *dialog, gint arg1, gpointer user_data) { // If nothing chosen, default to NTSC tmp = gtk_combo_box_get_active (GTK_COMBO_BOX (widget)); - if (tmp == -1) + if (tmp == -1) tmp = PSX_TYPE_NTSC; if (!strcmp("NTSC", psxtypes[tmp])) @@ -920,6 +921,7 @@ void OnCpu_Clicked(GtkDialog *dialog, gint arg1, gpointer user_data) { Config.Cdda = gtk_combo_box_get_active(GTK_COMBO_BOX(gtk_builder_get_object(builder, "GtkCombo_CDDA"))); Config.SlowBoot = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(gtk_builder_get_object(builder, "GtkCheckButton_SlowBoot"))); Config.PsxAuto = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(gtk_builder_get_object(builder, "GtkCheckButton_PsxAuto"))); + Config.GdbServer = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(gtk_builder_get_object(builder, "GtkCheckButton_GdbServer"))); t = Config.Debug; Config.Debug = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(gtk_builder_get_object(builder, "GtkCheckButton_Dbg"))); @@ -928,6 +930,9 @@ void OnCpu_Clicked(GtkDialog *dialog, gint arg1, gpointer user_data) { else StopDebugger(); } + if (Config.GdbServer) + dbg_start(); + t = Config.Cpu; Config.Cpu = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(gtk_builder_get_object(builder, "GtkCheckButton_Cpu"))); if (t != Config.Cpu) { @@ -974,7 +979,7 @@ void OnConf_Cpu() { char buf[25]; builder = gtk_builder_new(); - + if (!gtk_builder_add_from_resource(builder, "/org/pcsxr/gui/pcsxr.ui", NULL)) { g_warning("Error: interface could not be loaded!"); return; diff --git a/gui/LnxMain.c b/gui/LnxMain.c index d6dd9316..2e087ee3 100644 --- a/gui/LnxMain.c +++ b/gui/LnxMain.c @@ -32,6 +32,7 @@ #include <dirent.h> #include <sys/stat.h> #include "../libpcsxcore/sio.h" +#include "../gdbstub/gdbstub_sys.h" #include "Linux.h" #include "ConfDlg.h" @@ -320,6 +321,11 @@ int main(int argc, char *argv[]) { SetIsoFile(isofilename); runcd = RUN_CD; } + else if (!strcmp(argv[i], "-gdb")) { + /* Force configuration. */ + Config.Cpu = CPU_INTERPRETER; + Config.GdbServer = 1; + } else if (!strcmp(argv[i], "-h") || !strcmp(argv[i], "-help") || !strcmp(argv[i], "--help")) { @@ -443,7 +449,7 @@ int main(int argc, char *argv[]) { } } } - + if (loadst==0) { loadst = UpdateMenuSlots() + 1; } @@ -460,6 +466,8 @@ int main(int argc, char *argv[]) { psxCpu->Execute(); } + if (Config.GdbServer) dbg_stop(); + return 0; } @@ -490,9 +498,10 @@ int SysInit() { LoadMcds(Config.Mcd1, Config.Mcd2); /* TODO Do we need to have this here, or in the calling main() function?? */ - if (Config.Debug) { + if (Config.Debug) StartDebugger(); - } + else if (Config.GdbServer) + dbg_start(); return 0; } diff --git a/gui/data/pcsxr.ui b/gui/data/pcsxr.ui index 6f6a9b12..1426911b 100644 --- a/gui/data/pcsxr.ui +++ b/gui/data/pcsxr.ui @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Generated with glade 3.20.0 --> +<!-- Generated with glade 3.22.2 --> <interface> <requires lib="gtk+" version="3.14"/> <object class="GtkAboutDialog" id="AboutDlg"> @@ -10,6 +10,9 @@ <property name="type_hint">dialog</property> <property name="program_name">pcsxr</property> <property name="logo_icon_name">image-missing</property> + <child type="titlebar"> + <placeholder/> + </child> <child internal-child="vbox"> <object class="GtkBox" id="aboutdialog-vbox1"> <property name="can_focus">False</property> @@ -32,9 +35,6 @@ </child> </object> </child> - <child> - <placeholder/> - </child> </object> <object class="GtkDialog" id="CheatListDlg"> <property name="can_focus">False</property> @@ -43,6 +43,9 @@ <property name="modal">True</property> <property name="window_position">center-on-parent</property> <property name="type_hint">dialog</property> + <child type="titlebar"> + <placeholder/> + </child> <child internal-child="vbox"> <object class="GtkBox" id="dialog-vbox7"> <property name="visible">True</property> @@ -217,9 +220,6 @@ <action-widgets> <action-widget response="0">closbutton1</action-widget> </action-widgets> - <child> - <placeholder/> - </child> </object> <object class="GtkDialog" id="ConfDlg"> <property name="can_focus">False</property> @@ -228,6 +228,9 @@ <property name="modal">True</property> <property name="window_position">center-on-parent</property> <property name="type_hint">dialog</property> + <child type="titlebar"> + <placeholder/> + </child> <child internal-child="vbox"> <object class="GtkBox" id="dialog-vbox4"> <property name="visible">True</property> @@ -916,9 +919,6 @@ <action-widgets> <action-widget response="-6">btn_ConfClose</action-widget> </action-widgets> - <child> - <placeholder/> - </child> </object> <object class="GtkDialog" id="McdsDlg"> <property name="can_focus">False</property> @@ -928,6 +928,9 @@ <property name="default_width">688</property> <property name="default_height">400</property> <property name="type_hint">dialog</property> + <child type="titlebar"> + <placeholder/> + </child> <child internal-child="vbox"> <object class="GtkBox" id="dialog-vbox3"> <property name="visible">True</property> @@ -1750,9 +1753,6 @@ <action-widgets> <action-widget response="-5">McdClose</action-widget> </action-widgets> - <child> - <placeholder/> - </child> </object> <object class="GtkDialog" id="MemViewDlg"> <property name="can_focus">False</property> @@ -1762,6 +1762,9 @@ <property name="modal">True</property> <property name="window_position">center-on-parent</property> <property name="type_hint">dialog</property> + <child type="titlebar"> + <placeholder/> + </child> <child internal-child="vbox"> <object class="GtkBox" id="dialog-vbox9"> <property name="visible">True</property> @@ -2032,9 +2035,6 @@ <action-widgets> <action-widget response="0">memview_close</action-widget> </action-widgets> - <child> - <placeholder/> - </child> </object> <object class="GtkDialog" id="NetDlg"> <property name="can_focus">False</property> @@ -2044,6 +2044,9 @@ <property name="window_position">center-on-parent</property> <property name="type_hint">dialog</property> <signal name="destroy" handler="OnNet_Cancel" swapped="no"/> + <child type="titlebar"> + <placeholder/> + </child> <child internal-child="vbox"> <object class="GtkBox" id="dialog-vbox2"> <property name="visible">True</property> @@ -2191,9 +2194,6 @@ <action-widgets> <action-widget response="-6">closebutton2</action-widget> </action-widgets> - <child> - <placeholder/> - </child> </object> <object class="GtkListStore" id="PGXP_Mode_list"> <columns> @@ -2219,6 +2219,9 @@ <property name="modal">True</property> <property name="window_position">center-on-parent</property> <property name="type_hint">dialog</property> + <child type="titlebar"> + <placeholder/> + </child> <child internal-child="vbox"> <object class="GtkBox"> <property name="can_focus">False</property> @@ -2454,9 +2457,6 @@ <action-widgets> <action-widget response="0">PgxpDlg_close</action-widget> </action-widgets> - <child> - <placeholder/> - </child> </object> <object class="GtkAdjustment" id="adjustment_PsxClock"> <property name="lower">0.5</property> @@ -2638,6 +2638,9 @@ <property name="resizable">False</property> <property name="icon_name">pcsxr-icon.png</property> <signal name="destroy" handler="OnDestroy" swapped="no"/> + <child type="titlebar"> + <placeholder/> + </child> <child> <object class="GtkBox" id="vbox18"> <property name="visible">True</property> @@ -3444,9 +3447,6 @@ </child> </object> </child> - <child type="titlebar"> - <placeholder/> - </child> </object> <object class="GtkListStore" id="liststore1"> <columns> @@ -3536,6 +3536,9 @@ <property name="modal">True</property> <property name="window_position">center-on-parent</property> <property name="type_hint">dialog</property> + <child type="titlebar"> + <placeholder/> + </child> <child internal-child="vbox"> <object class="GtkBox" id="dialog-vbox8"> <property name="visible">True</property> @@ -4055,9 +4058,6 @@ <action-widgets> <action-widget response="0">closebutton</action-widget> </action-widgets> - <child> - <placeholder/> - </child> </object> <object class="GtkListStore" id="liststore5"> <columns> @@ -4083,6 +4083,9 @@ <property name="modal">True</property> <property name="window_position">center-on-parent</property> <property name="type_hint">dialog</property> + <child type="titlebar"> + <placeholder/> + </child> <child internal-child="vbox"> <object class="GtkBox" id="dialog-vbox1"> <property name="visible">True</property> @@ -4143,8 +4146,8 @@ <property name="draw_indicator">True</property> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">2</property> + <property name="left_attach">1</property> + <property name="top_attach">1</property> </packing> </child> <child> @@ -4158,7 +4161,7 @@ </object> <packing> <property name="left_attach">0</property> - <property name="top_attach">3</property> + <property name="top_attach">1</property> </packing> </child> <child> @@ -4171,8 +4174,8 @@ <property name="draw_indicator">True</property> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">1</property> + <property name="left_attach">1</property> + <property name="top_attach">0</property> </packing> </child> <child> @@ -4200,7 +4203,7 @@ </object> <packing> <property name="left_attach">0</property> - <property name="top_attach">5</property> + <property name="top_attach">2</property> </packing> </child> <child> @@ -4214,7 +4217,7 @@ </object> <packing> <property name="left_attach">0</property> - <property name="top_attach">7</property> + <property name="top_attach">3</property> </packing> </child> <child> @@ -4227,8 +4230,8 @@ <property name="draw_indicator">True</property> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">6</property> + <property name="left_attach">1</property> + <property name="top_attach">2</property> </packing> </child> <child> @@ -4241,8 +4244,8 @@ <property name="draw_indicator">True</property> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">8</property> + <property name="left_attach">1</property> + <property name="top_attach">3</property> </packing> </child> <child> @@ -4255,8 +4258,8 @@ <property name="draw_indicator">True</property> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">9</property> + <property name="left_attach">1</property> + <property name="top_attach">6</property> </packing> </child> <child> @@ -4269,8 +4272,8 @@ <property name="draw_indicator">True</property> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">10</property> + <property name="left_attach">1</property> + <property name="top_attach">4</property> </packing> </child> <child> @@ -4284,7 +4287,7 @@ </object> <packing> <property name="left_attach">0</property> - <property name="top_attach">11</property> + <property name="top_attach">5</property> </packing> </child> <child> @@ -4297,8 +4300,8 @@ <property name="draw_indicator">True</property> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">12</property> + <property name="left_attach">1</property> + <property name="top_attach">5</property> </packing> </child> <child> @@ -4312,11 +4315,22 @@ </object> <packing> <property name="left_attach">0</property> - <property name="top_attach">13</property> + <property name="top_attach">6</property> </packing> </child> <child> - <placeholder/> + <object class="GtkCheckButton" id="GtkCheckButton_GdbServer"> + <property name="label" translatable="yes">Enable GDB server</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="use_underline">True</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">4</property> + </packing> </child> </object> </child> @@ -4810,8 +4824,5 @@ <action-widgets> <action-widget response="-6">closebutton1</action-widget> </action-widgets> - <child> - <placeholder/> - </child> </object> </interface> |
