summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXavier Del Campo Romero <xavi.dcr@tutanota.com>2020-05-22 00:50:40 +0200
committerXavier Del Campo Romero <xavi.dcr@tutanota.com>2020-05-22 00:53:22 +0200
commitaea565d558f929729c0cb889f9c3296f2f487d0d (patch)
tree106995c4372fac1cac1406ea7d39f00d51b317ae
parent004a30545873496d279b4975ba74f3d334291dfe (diff)
Added GDB server on CpuCfg UI dialog, rearranged layout
The layout was rearranged to make it fit on smaller screens e.g.: 768pix height as featured on many laptops. GDB server not implemented yet.
-rw-r--r--gui/ConfDlg.c11
-rw-r--r--gui/data/pcsxr.ui113
-rw-r--r--libpcsxcore/psxcommon.h5
3 files changed, 71 insertions, 58 deletions
diff --git a/gui/ConfDlg.c b/gui/ConfDlg.c
index d55234f8..e40a99fa 100644
--- a/gui/ConfDlg.c
+++ b/gui/ConfDlg.c
@@ -109,7 +109,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 +219,7 @@ void OnConf_Net() {
}
NetDlg = GTK_WIDGET(gtk_builder_get_object(builder, "NetDlg"));
-
+
gtk_widget_show (NetDlg);
FindNetPlugin(builder);
@@ -791,7 +791,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 +894,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 +920,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")));
@@ -974,7 +975,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/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>
diff --git a/libpcsxcore/psxcommon.h b/libpcsxcore/psxcommon.h
index f2fba819..c6deaa9f 100644
--- a/libpcsxcore/psxcommon.h
+++ b/libpcsxcore/psxcommon.h
@@ -17,8 +17,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *
***************************************************************************/
-/*
-* This file contains common definitions and includes for all parts of the
+/*
+* This file contains common definitions and includes for all parts of the
* emulator core.
*/
@@ -172,6 +172,7 @@ typedef struct {
boolean PGXP_Cache;
boolean PGXP_Texture;
u32 PGXP_Mode;
+ boolean GdbServer;
#ifdef _WIN32
char Lang[256];
#endif