summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStelios Tsampas <loathingkernel@gmail.com>2017-07-17 23:22:35 +0300
committerStelios Tsampas <loathingkernel@gmail.com>2017-07-17 23:22:35 +0300
commitf48b5b2ac35ee69db0c0ffd3f411ffc21b7d5789 (patch)
tree22d499eabc60f6fbb1ecd05b2ca9c53ac931e3cb
parent7a43668f9d227213586a305d1913d3c4b5d98f5a (diff)
* Add configuration UI for PGXP.
* Clean generated files with `make clean`
-rwxr-xr-xgui/ConfDlg.c83
-rw-r--r--gui/Makefile.am2
-rw-r--r--gui/data/pcsxr.ui294
-rw-r--r--plugins/bladesio1/Makefile.am3
-rw-r--r--plugins/dfcdrom/Makefile.am3
-rw-r--r--plugins/dfinput/Makefile.am2
-rwxr-xr-xplugins/dfnet/Makefile.am2
-rwxr-xr-xplugins/dfsound/Makefile.am3
-rwxr-xr-xplugins/dfxvideo/Makefile.am3
-rwxr-xr-xplugins/peopsxgl/Makefile.am3
10 files changed, 396 insertions, 2 deletions
diff --git a/gui/ConfDlg.c b/gui/ConfDlg.c
index 30d3df1f..529e2722 100755
--- a/gui/ConfDlg.c
+++ b/gui/ConfDlg.c
@@ -845,6 +845,7 @@ static void FindNetPlugin() {
}
GtkWidget *CpuDlg;
+GtkWidget *PgxpDlg;
GList *psxglist;
char *psxtypes[] = {
"NTSC",
@@ -1033,5 +1034,87 @@ void OnConf_Cpu() {
G_CALLBACK(OnCpu_Clicked), builder, (GClosureNotify)g_object_unref, G_CONNECT_AFTER);
}
+//When a different mode is selected, display some informational text
+static void OnPgxp_ModeChanged(GtkWidget *widget, gpointer user_data) {
+ uint8_t mode;
+
+ mode = gtk_combo_box_get_active(GTK_COMBO_BOX(
+ gtk_builder_get_object(builder, "PGXP_Mode")));
+
+ switch (mode) {
+ case 0:
+ gtk_label_set_text(GTK_LABEL(gtk_builder_get_object(builder, "PGXP_Mode_title")),
+ _("Disabled"));
+ gtk_label_set_text(GTK_LABEL(gtk_builder_get_object(builder, "PGXP_Mode_description")),
+ _("PGXP is not mirroring any functions currently."));
+ break;
+ case 1:
+ gtk_label_set_text(GTK_LABEL(gtk_builder_get_object(builder, "PGXP_Mode_title")),
+ _("Memory operations only"));
+ gtk_label_set_text(GTK_LABEL(gtk_builder_get_object(builder, "PGXP_Mode_description")),
+ _("PGXP is mirroring load, store and processor transfer operations of the CPU and GTE."));
+ break;
+ case 2:
+ gtk_label_set_text(GTK_LABEL(gtk_builder_get_object(builder, "PGXP_Mode_title")),
+ _("Memory and CPU arithmetic operations"));
+ gtk_label_set_text(GTK_LABEL(gtk_builder_get_object(builder, "PGXP_Mode_description")),
+ _("PGXP is mirroring load, store and transfer operations of the CPU and GTE and arithmetic/logic functions of the PSX CPU.\n(WARNING: This mode is currently unfinished and may cause incorrect behaviour in some games)."));
+ break;
+ default:
+ gtk_label_set_text(GTK_LABEL(gtk_builder_get_object(builder, "PGXP_Mode_title")),
+ _("Error"));
+ gtk_label_set_text(GTK_LABEL(gtk_builder_get_object(builder, "PGXP_Mode_description")),
+ _("Unknown mode."));
+ }
+}
+
+static void OnPgxp_Clicked(GtkDialog *dialog, gint arg1, gpointer user_data) {
+
+ Config.PGXP_GTE = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(
+ gtk_builder_get_object(builder, "PGXP_GTE")));
+ Config.PGXP_Cache = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(
+ gtk_builder_get_object(builder, "PGXP_Cache")));
+ Config.PGXP_Texture = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(
+ gtk_builder_get_object(builder, "PGXP_Texture")));
+
+ Config.PGXP_Mode = gtk_combo_box_get_active(GTK_COMBO_BOX(
+ gtk_builder_get_object(builder, "PGXP_Mode")));
+
+ EmuSetPGXPMode(Config.PGXP_Mode);
+ SaveConfig();
+
+ gtk_widget_destroy(PgxpDlg);
+ PgxpDlg = NULL;
+}
+
void OnConf_Pgxp() {
+ GtkWidget *widget;
+ 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;
+ }
+
+ PgxpDlg = GTK_WIDGET(gtk_builder_get_object(builder, "PgxpDlg"));
+ gtk_window_set_default_size(GTK_WINDOW(PgxpDlg), 320, 320);
+ gtk_widget_show (PgxpDlg);
+
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(
+ gtk_builder_get_object(builder, "PGXP_GTE")), Config.PGXP_GTE);
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(
+ gtk_builder_get_object(builder, "PGXP_Cache")), Config.PGXP_Cache);
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(
+ gtk_builder_get_object(builder, "PGXP_Texture")), Config.PGXP_Texture);
+
+ gtk_combo_box_set_active(GTK_COMBO_BOX(
+ gtk_builder_get_object(builder, "PGXP_Mode")), Config.PGXP_Mode);
+ OnPgxp_ModeChanged(NULL, NULL);
+
+ g_signal_connect_data(G_OBJECT(gtk_builder_get_object(builder, "PGXP_Mode")), "changed",
+ G_CALLBACK(OnPgxp_ModeChanged), builder, NULL, G_CONNECT_AFTER);
+ g_signal_connect_data(G_OBJECT(PgxpDlg), "response",
+ G_CALLBACK(OnPgxp_Clicked), builder, (GClosureNotify)g_object_unref, G_CONNECT_AFTER);
}
diff --git a/gui/Makefile.am b/gui/Makefile.am
index ebae1d48..7db62f01 100644
--- a/gui/Makefile.am
+++ b/gui/Makefile.am
@@ -77,3 +77,5 @@ GtkResources.h: pcsxr.gresource.xml $(pcsxr_gresource)
pcsxr_LDADD = \
../libpcsxcore/libpcsxcore.a \
$(GTK3_LIBS) -lpthread -lz -lm -lXext -lXtst
+
+CLEANFILES = pcsxr.gresource.xml GtkResources.c GtkResources.h
diff --git a/gui/data/pcsxr.ui b/gui/data/pcsxr.ui
index 6cc4b24f..35937bfb 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.19.0 -->
+<!-- Generated with glade 3.20.0 -->
<interface>
<requires lib="gtk+" version="3.14"/>
<object class="GtkAboutDialog" id="AboutDlg">
@@ -32,6 +32,9 @@
</child>
</object>
</child>
+ <child>
+ <placeholder/>
+ </child>
</object>
<object class="GtkDialog" id="CheatListDlg">
<property name="can_focus">False</property>
@@ -214,6 +217,9 @@
<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>
@@ -919,6 +925,9 @@
<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>
@@ -1731,6 +1740,9 @@
<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>
@@ -2013,6 +2025,9 @@
<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>
@@ -2169,6 +2184,9 @@
<action-widgets>
<action-widget response="-6">closebutton2</action-widget>
</action-widgets>
+ <child>
+ <placeholder/>
+ </child>
</object>
<object class="GtkImage" id="image1">
<property name="visible">True</property>
@@ -2239,7 +2257,6 @@
<object class="GtkImage" id="image2">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0.49000000953674316</property>
<property name="icon_name">pcsxr-cd-open</property>
<property name="icon_size">1</property>
</object>
@@ -2303,6 +2320,12 @@
<property name="icon_name">pcsxr-plugin-sio1</property>
<property name="icon_size">1</property>
</object>
+ <object class="GtkImage" id="image43">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="icon_name">pcsxr-pgxp</property>
+ <property name="icon_size">1</property>
+ </object>
<object class="GtkImage" id="image5">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -2836,6 +2859,23 @@
</object>
</child>
<child>
+ <object class="GtkImageMenuItem" id="pgxp1">
+ <property name="label" translatable="yes">_PGXP...</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="use_underline">True</property>
+ <property name="image">image43</property>
+ <property name="use_stock">False</property>
+ <signal name="activate" handler="OnConf_Pgxp" swapped="no"/>
+ </object>
+ </child>
+ <child>
+ <object class="GtkSeparatorMenuItem" id="separator10">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </object>
+ </child>
+ <child>
<object class="GtkImageMenuItem" id="cpu1">
<property name="label" translatable="yes">_CPU...</property>
<property name="visible">True</property>
@@ -3128,6 +3168,9 @@
</child>
</object>
</child>
+ <child type="titlebar">
+ <placeholder/>
+ </child>
</object>
<object class="GtkListStore" id="liststore1">
<columns>
@@ -3745,6 +3788,9 @@
<action-widgets>
<action-widget response="0">closebutton</action-widget>
</action-widgets>
+ <child>
+ <placeholder/>
+ </child>
</object>
<object class="GtkListStore" id="liststore5">
<columns>
@@ -4417,5 +4463,249 @@
<action-widgets>
<action-widget response="-6">closebutton1</action-widget>
</action-widgets>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ <object class="GtkListStore" id="liststore6">
+ <columns>
+ <!-- column-name item -->
+ <column type="gchararray"/>
+ </columns>
+ <data>
+ <row>
+ <col id="0" translatable="yes">Disabled</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Memory only</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Memory + Cpu logic</col>
+ </row>
+ </data>
+ </object>
+ <object class="GtkDialog" id="PgxpDlg">
+ <property name="can_focus">False</property>
+ <property name="title" translatable="yes">Configure PGXP</property>
+ <property name="resizable">False</property>
+ <property name="modal">True</property>
+ <property name="window_position">center-on-parent</property>
+ <property name="type_hint">dialog</property>
+ <child internal-child="vbox">
+ <object class="GtkBox">
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <child internal-child="action_area">
+ <object class="GtkButtonBox">
+ <property name="can_focus">False</property>
+ <property name="layout_style">end</property>
+ <child>
+ <object class="GtkButton" id="PgxpDlg_close">
+ <property name="label">gtk-close</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkBox">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">5</property>
+ <child>
+ <object class="GtkFrame" id="PgxpDlg_Options">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label_xalign">0</property>
+ <child>
+ <object class="GtkAlignment">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkBox">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkCheckButton" id="PGXP_GTE">
+ <property name="label" translatable="yes">Enable PGXP GTE vertex creation</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="PGXP_Cache">
+ <property name="label" translatable="yes">Enable vertex caching.</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="PGXP_Texture">
+ <property name="label" translatable="yes">Enable perspective correct texturing.</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Options</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkFrame" id="PgxpDlg_Mode">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label_xalign">0</property>
+ <child>
+ <object class="GtkAlignment">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkBox">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <property name="baseline_position">top</property>
+ <child>
+ <object class="GtkComboBox" id="PGXP_Mode">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="margin_left">40</property>
+ <property name="margin_right">40</property>
+ <property name="model">liststore6</property>
+ <child>
+ <object class="GtkCellRendererText" id="cellrenderertext6"/>
+ <attributes>
+ <attribute name="text">0</attribute>
+ </attributes>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="PGXP_Mode_title">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">start</property>
+ <property name="margin_top">4</property>
+ <property name="margin_bottom">4</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="PGXP_Mode_description">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="margin_right">10</property>
+ <property name="wrap">True</property>
+ <property name="max_width_chars">20</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Select PGXP Mode</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <action-widgets>
+ <action-widget response="0">PgxpDlg_close</action-widget>
+ </action-widgets>
+ <child>
+ <placeholder/>
+ </child>
</object>
</interface>
diff --git a/plugins/bladesio1/Makefile.am b/plugins/bladesio1/Makefile.am
index 880aa647..badd57e5 100644
--- a/plugins/bladesio1/Makefile.am
+++ b/plugins/bladesio1/Makefile.am
@@ -38,3 +38,6 @@ GtkResources.h: bladesio1.gresource.xml $(bladesio1_gresource)
#glade_DATA = sio1.ui
#gladedir = $(datadir)/psemu/
EXTRA_DIST = $(glade_DATA)
+
+CLEANFILES = bladesio1.gresource.xml GtkResources.c GtkResources.h
+
diff --git a/plugins/dfcdrom/Makefile.am b/plugins/dfcdrom/Makefile.am
index 4b3dec4b..1f87998b 100644
--- a/plugins/dfcdrom/Makefile.am
+++ b/plugins/dfcdrom/Makefile.am
@@ -53,3 +53,6 @@ GtkResources.h: dfcdrom.gresource.xml $(dfcdrom_gresource)
#glade_DATA = cdrcfg-0.1df/dfcdrom.ui
#gladedir = $(datadir)/psemu/
EXTRA_DIST = $(glade_DATA)
+
+CLEANFILES = dfcdrom.gresource.xml GtkResources.c GtkResources.h
+
diff --git a/plugins/dfinput/Makefile.am b/plugins/dfinput/Makefile.am
index 11eee3eb..458259c5 100644
--- a/plugins/dfinput/Makefile.am
+++ b/plugins/dfinput/Makefile.am
@@ -39,3 +39,5 @@ GtkResources.h: dfinput.gresource.xml $(dfinput_gresource)
#glade_DATA = dfinput.ui
#gladedir = $(datadir)/psemu/
EXTRA_DIST = $(glade_DATA)
+
+CLEANFILES = dfinput.gresource.xml GtkResources.c GtkResources.h
diff --git a/plugins/dfnet/Makefile.am b/plugins/dfnet/Makefile.am
index 4000b8c4..f0a53ea0 100755
--- a/plugins/dfnet/Makefile.am
+++ b/plugins/dfnet/Makefile.am
@@ -38,3 +38,5 @@ GtkResources.h: dfnet.gresource.xml $(dfnet_gresource)
#glade_DATA = dfnet.ui
#gladedir = $(datadir)/psemu/
EXTRA_DIST = $(glade_DATA)
+
+CLEANFILES = dfnet.gresource.xml GtkResources.c GtkResources.h
diff --git a/plugins/dfsound/Makefile.am b/plugins/dfsound/Makefile.am
index b34f3267..9f8130a1 100755
--- a/plugins/dfsound/Makefile.am
+++ b/plugins/dfsound/Makefile.am
@@ -74,3 +74,6 @@ GtkResources.h: dfsound.gresource.xml $(dfsound_gresource)
#glade_DATA = spucfg-0.1df/dfsound.ui
#gladedir = $(datadir)/psemu/
EXTRA_DIST = $(glade_DATA)
+
+CLEANFILES = dfsound.gresource.xml GtkResources.c GtkResources.h
+
diff --git a/plugins/dfxvideo/Makefile.am b/plugins/dfxvideo/Makefile.am
index 86e8ef3a..520749b2 100755
--- a/plugins/dfxvideo/Makefile.am
+++ b/plugins/dfxvideo/Makefile.am
@@ -52,3 +52,6 @@ GtkResources.h: dfxvideo.gresource.xml $(dfxvideo_gresource)
#glade_DATA = gpucfg-0.1df/dfxvideo.ui
#gladedir = $(datadir)/psemu/
EXTRA_DIST = $(glade_DATA)
+
+CLEANFILES = dfxvideo.gresource.xml GtkResources.c GtkResources.h
+
diff --git a/plugins/peopsxgl/Makefile.am b/plugins/peopsxgl/Makefile.am
index a37643e6..576e140d 100755
--- a/plugins/peopsxgl/Makefile.am
+++ b/plugins/peopsxgl/Makefile.am
@@ -52,3 +52,6 @@ GtkResources.h: peopsxgl.gresource.xml $(peopsxgl_gresource)
#glade_DATA = gpucfg/peopsxgl.ui
#gladedir = $(datadir)/psemu/
EXTRA_DIST = $(glade_DATA)
+
+CLEANFILES = peopsxgl.gresource.xml GtkResources.c GtkResources.h
+