summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authoriCatButler <i.am.catbutler@gmail.com>2018-03-13 17:25:13 +0000
committerGitHub <noreply@github.com>2018-03-13 17:25:13 +0000
commit768332417644451d38ce1a737465656c7cc75de3 (patch)
treee6ca381effb72ccc4161d40f224b817a6631bc03 /plugins
parent15fe3782c1375634b7a9bd9bbbadfd75e7b06fed (diff)
parent2d0b10f982e0b835f4b27be26b138703907a4219 (diff)
downloadpcsxr-768332417644451d38ce1a737465656c7cc75de3.tar.gz
Merge pull request #6 from loathingKernel/fix-linux-build
Fix compilation on Linux and add the new setting to the UI
Diffstat (limited to 'plugins')
-rw-r--r--plugins/bladesio1/Makefile.am29
-rw-r--r--plugins/bladesio1/gui.c3
-rw-r--r--plugins/dfcdrom/Makefile.am29
-rw-r--r--plugins/dfcdrom/cdrcfg-0.1df/dfcdrom.ui167
-rwxr-xr-xplugins/dfcdrom/cdrcfg-0.1df/main.c7
-rw-r--r--plugins/dfinput/Makefile.am28
-rwxr-xr-xplugins/dfinput/cfg-gtk.c33
-rwxr-xr-xplugins/dfinput/cfg.c5
-rw-r--r--plugins/dfinput/dfinput.ui233
-rwxr-xr-xplugins/dfinput/pad.c18
-rwxr-xr-xplugins/dfinput/pad.h1
-rwxr-xr-xplugins/dfinput/sdljoy.c4
-rwxr-xr-xplugins/dfinput/xkb.c4
-rwxr-xr-xplugins/dfnet/Makefile.am28
-rw-r--r--[-rwxr-xr-x]plugins/dfnet/dfnet.ui41
-rwxr-xr-xplugins/dfnet/gui.c3
-rwxr-xr-xplugins/dfsound/Makefile.am28
-rw-r--r--[-rwxr-xr-x]plugins/dfsound/spucfg-0.1df/dfsound.ui168
-rwxr-xr-xplugins/dfsound/spucfg-0.1df/main.c3
-rwxr-xr-xplugins/dfxvideo/Makefile.am29
-rw-r--r--[-rwxr-xr-x]plugins/dfxvideo/gpucfg-0.1df/dfxvideo.ui280
-rwxr-xr-xplugins/dfxvideo/gpucfg-0.1df/main.c3
-rw-r--r--plugins/nullsio1/Makefile.am10
-rw-r--r--plugins/nullsio1/sio1.c289
-rw-r--r--plugins/nullsio1/typedefs.h35
-rwxr-xr-xplugins/peopsxgl/Makefile.am45
-rwxr-xr-xplugins/peopsxgl/gpu.c2
-rwxr-xr-xplugins/peopsxgl/gpucfg/main.c3
-rw-r--r--[-rwxr-xr-x]plugins/peopsxgl/gpucfg/peopsxgl.ui646
-rwxr-xr-xplugins/peopsxgl/prim.c2
30 files changed, 1329 insertions, 847 deletions
diff --git a/plugins/bladesio1/Makefile.am b/plugins/bladesio1/Makefile.am
index 9e0b6ab5..badd57e5 100644
--- a/plugins/bladesio1/Makefile.am
+++ b/plugins/bladesio1/Makefile.am
@@ -12,9 +12,32 @@ AM_CPPFLAGS = -DLOCALE_DIR=\"${datadir}/locale/\" \
-I$(top_srcdir)/libpcsxcore -I../../include
bin_PROGRAMS = cfgBladeSio1
-cfgBladeSio1_SOURCES = gui.c sio1.h
+cfgBladeSio1_SOURCES = gui.c sio1.h GtkResources.c GtkResources.h
cfgBladeSio1_LDADD = $(GTK3_LIBS)
-glade_DATA = sio1.ui
-gladedir = $(datadir)/psemu/
+# gresource.xml is dynamically generated in CMake. Mirror that here in a static way.
+define gresource_xml =
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+ <gresource prefix="/org/pcsxr/bladesio1">
+ <file>sio1.ui</file>
+ </gresource>
+</gresources>
+endef
+
+bladesio1.gresource.xml:
+ $(file >$@,$(gresource_xml))
+bladesio1_gresource: bladesio1.gresource.xml
+ $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/$<)
+GtkResources.c: bladesio1.gresource.xml $(bladesio1_gresource)
+ $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) --generate-source --c-name bladesio1 $<
+GtkResources.h: bladesio1.gresource.xml $(bladesio1_gresource)
+ $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) --generate-header --c-name bladesio1 $<
+
+
+#glade_DATA = sio1.ui
+#gladedir = $(datadir)/psemu/
EXTRA_DIST = $(glade_DATA)
+
+CLEANFILES = bladesio1.gresource.xml GtkResources.c GtkResources.h
+
diff --git a/plugins/bladesio1/gui.c b/plugins/bladesio1/gui.c
index 99979f15..37ffb83f 100644
--- a/plugins/bladesio1/gui.c
+++ b/plugins/bladesio1/gui.c
@@ -103,7 +103,7 @@ void configure() {
builder = gtk_builder_new();
- if(!gtk_builder_add_from_file(builder, DATADIR "sio1.ui", NULL))
+ if(!gtk_builder_add_from_resource(builder, "/org/pcsxr/bladesio1/sio1.ui", NULL))
g_warning("We could not load the interface!");
settingsRead();
@@ -166,6 +166,7 @@ void about() {
GtkWidget *widget;
widget = gtk_about_dialog_new();
+ gtk_about_dialog_set_logo_icon_name (GTK_ABOUT_DIALOG(widget), "help-about");
gtk_about_dialog_set_program_name(GTK_ABOUT_DIALOG(widget), "Link Cable");
gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(widget), "1.0");
gtk_about_dialog_set_authors(GTK_ABOUT_DIALOG(widget), authors);
diff --git a/plugins/dfcdrom/Makefile.am b/plugins/dfcdrom/Makefile.am
index 6bc42c35..1f87998b 100644
--- a/plugins/dfcdrom/Makefile.am
+++ b/plugins/dfcdrom/Makefile.am
@@ -27,9 +27,32 @@ AM_CPPFLAGS = -DLOCALE_DIR=\"${datadir}/locale/\" \
-I$(top_srcdir)/libpcsxcore -I../../include
bin_PROGRAMS = cfgDFCdrom
-cfgDFCdrom_SOURCES = cdrcfg-0.1df/main.c
+cfgDFCdrom_SOURCES = cdrcfg-0.1df/main.c GtkResources.c GtkResources.h
cfgDFCdrom_LDADD = $(GTK3_LIBS)
-glade_DATA = cdrcfg-0.1df/dfcdrom.ui
-gladedir = $(datadir)/psemu/
+# gresource.xml is dynamically generated in CMake. Mirror that here in a static way.
+define gresource_xml =
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+ <gresource prefix="/org/pcsxr/dfcdrom">
+ <file>dfcdrom.ui</file>
+ </gresource>
+</gresources>
+endef
+
+dfcdrom.gresource.xml:
+ $(file >$@,$(gresource_xml))
+dfcdrom_gresource: dfcdrom.gresource.xml
+ $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(srcdir)/cdrcfg-0.1df --generate-dependencies $(srcdir)/$<)
+GtkResources.c: dfcdrom.gresource.xml $(dfcdrom_gresource)
+ $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir)/cdrcfg-0.1df --generate-source --c-name dfcdrom $<
+GtkResources.h: dfcdrom.gresource.xml $(dfcdrom_gresource)
+ $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir)/cdrcfg-0.1df --generate-header --c-name dfcdrom $<
+
+
+#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/dfcdrom/cdrcfg-0.1df/dfcdrom.ui b/plugins/dfcdrom/cdrcfg-0.1df/dfcdrom.ui
index c282b2a1..988dee16 100644
--- a/plugins/dfcdrom/cdrcfg-0.1df/dfcdrom.ui
+++ b/plugins/dfcdrom/cdrcfg-0.1df/dfcdrom.ui
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.19.0 -->
<interface>
- <!-- interface-requires gtk+ 3.0 -->
+ <requires lib="gtk+" version="3.0"/>
<object class="GtkAdjustment" id="adjustmentCacheSize">
<property name="lower">32</property>
<property name="upper">2048</property>
@@ -13,6 +14,76 @@
<property name="step_increment">1</property>
<property name="page_increment">4</property>
</object>
+ <object class="GtkListStore" id="liststoreReadMode">
+ <columns>
+ <!-- column-name Item -->
+ <column type="gchararray"/>
+ </columns>
+ <data>
+ <row>
+ <col id="0" translatable="yes">Normal (No Cache)</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Threaded - Faster (With Cache)</col>
+ </row>
+ </data>
+ </object>
+ <object class="GtkListStore" id="liststoreSpindownTime">
+ <columns>
+ <!-- column-name Item -->
+ <column type="gchararray"/>
+ </columns>
+ <data>
+ <row>
+ <col id="0" translatable="yes">Default</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">125ms</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">250ms</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">500ms</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">1s</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">2s</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">4s</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">8s</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">16s</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">32s</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">1min</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">2min</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">4min</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">8min</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">16min</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">32min</col>
+ </row>
+ </data>
+ </object>
<object class="GtkDialog" id="CfgWnd">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -58,16 +129,17 @@
</packing>
</child>
<child>
- <object class="GtkVBox" id="vbox1">
+ <object class="GtkBox" id="vbox1">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
<child>
<object class="GtkFrame" id="frame1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label_xalign">0</property>
<child>
- <object class="GtkHBox" id="hbox5">
+ <object class="GtkBox" id="hbox5">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">5</property>
@@ -104,11 +176,12 @@
<property name="can_focus">False</property>
<property name="label_xalign">0</property>
<child>
- <object class="GtkVBox" id="vbox2">
+ <object class="GtkBox" id="vbox2">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
<child>
- <object class="GtkHBox" id="hbox1">
+ <object class="GtkBox" id="hbox1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">5</property>
@@ -117,8 +190,8 @@
<object class="GtkLabel" id="readmode_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
<property name="label" translatable="yes">Select read mode:</property>
+ <property name="xalign">0</property>
</object>
<packing>
<property name="expand">False</property>
@@ -152,7 +225,7 @@
</packing>
</child>
<child>
- <object class="GtkHBox" id="hbox2">
+ <object class="GtkBox" id="hbox2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">5</property>
@@ -161,8 +234,8 @@
<object class="GtkLabel" id="label4">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
<property name="label" translatable="yes">Cache Size (Def. 64):</property>
+ <property name="xalign">0</property>
</object>
<packing>
<property name="expand">False</property>
@@ -195,7 +268,7 @@
</packing>
</child>
<child>
- <object class="GtkHBox" id="hbox4">
+ <object class="GtkBox" id="hbox4">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">5</property>
@@ -204,8 +277,8 @@
<object class="GtkLabel" id="label7">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
<property name="label" translatable="yes">Spindown Time:</property>
+ <property name="xalign">0</property>
</object>
<packing>
<property name="expand">False</property>
@@ -240,7 +313,7 @@
</packing>
</child>
<child>
- <object class="GtkHBox" id="hbox3">
+ <object class="GtkBox" id="hbox3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">5</property>
@@ -249,8 +322,8 @@
<object class="GtkLabel" id="label5">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
<property name="label" translatable="yes">Cdrom Speed (Def. 0 = MAX):</property>
+ <property name="xalign">0</property>
</object>
<packing>
<property name="expand">False</property>
@@ -321,74 +394,4 @@
<action-widget response="-6">cfg_closebutton</action-widget>
</action-widgets>
</object>
- <object class="GtkListStore" id="liststoreReadMode">
- <columns>
- <!-- column-name Item -->
- <column type="gchararray"/>
- </columns>
- <data>
- <row>
- <col id="0" translatable="yes">Normal (No Cache)</col>
- </row>
- <row>
- <col id="0" translatable="yes">Threaded - Faster (With Cache)</col>
- </row>
- </data>
- </object>
- <object class="GtkListStore" id="liststoreSpindownTime">
- <columns>
- <!-- column-name Item -->
- <column type="gchararray"/>
- </columns>
- <data>
- <row>
- <col id="0" translatable="yes">Default</col>
- </row>
- <row>
- <col id="0" translatable="yes">125ms</col>
- </row>
- <row>
- <col id="0" translatable="yes">250ms</col>
- </row>
- <row>
- <col id="0" translatable="yes">500ms</col>
- </row>
- <row>
- <col id="0" translatable="yes">1s</col>
- </row>
- <row>
- <col id="0" translatable="yes">2s</col>
- </row>
- <row>
- <col id="0" translatable="yes">4s</col>
- </row>
- <row>
- <col id="0" translatable="yes">8s</col>
- </row>
- <row>
- <col id="0" translatable="yes">16s</col>
- </row>
- <row>
- <col id="0" translatable="yes">32s</col>
- </row>
- <row>
- <col id="0" translatable="yes">1min</col>
- </row>
- <row>
- <col id="0" translatable="yes">2min</col>
- </row>
- <row>
- <col id="0" translatable="yes">4min</col>
- </row>
- <row>
- <col id="0" translatable="yes">8min</col>
- </row>
- <row>
- <col id="0" translatable="yes">16min</col>
- </row>
- <row>
- <col id="0" translatable="yes">32min</col>
- </row>
- </data>
- </object>
</interface>
diff --git a/plugins/dfcdrom/cdrcfg-0.1df/main.c b/plugins/dfcdrom/cdrcfg-0.1df/main.c
index cc55aa36..a8aa4b67 100755
--- a/plugins/dfcdrom/cdrcfg-0.1df/main.c
+++ b/plugins/dfcdrom/cdrcfg-0.1df/main.c
@@ -208,7 +208,7 @@ long CDRconfigure() {
builder = gtk_builder_new();
- if (!gtk_builder_add_from_file(builder, DATADIR "dfcdrom.ui", NULL)) {
+ if (!gtk_builder_add_from_resource(builder, "/org/pcsxr/dfcdrom/dfcdrom.ui", NULL)) {
g_warning("We could not load the interface!");
return 0;
}
@@ -256,6 +256,7 @@ void CDRabout() {
"Wei Mingzhi <whistler_wmz@users.sf.net>", NULL};
widget = gtk_about_dialog_new();
+ gtk_about_dialog_set_logo_icon_name (GTK_ABOUT_DIALOG(widget), "help-about");
gtk_about_dialog_set_program_name(GTK_ABOUT_DIALOG(widget), "CD-ROM Device Reader");
gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(widget), "1.0");
gtk_about_dialog_set_authors(GTK_ABOUT_DIALOG(widget), authors);
@@ -276,13 +277,13 @@ int main(int argc, char *argv[]) {
gtk_init(&argc, &argv);
if (argc < 2) {
- printf ("Usage: cfgBladeSio1 {about | configure}\n");
+ printf ("Usage: cfgDFCdrom {about | configure}\n");
return 0;
}
if (strcmp(argv[1], "configure") != 0 &&
strcmp(argv[1], "about") != 0) {
- printf ("Usage: cfgBladeSio1 {about | configure}\n");
+ printf ("Usage: cfgDFCdrom {about | configure}\n");
return 0;
}
diff --git a/plugins/dfinput/Makefile.am b/plugins/dfinput/Makefile.am
index 70f86fd1..458259c5 100644
--- a/plugins/dfinput/Makefile.am
+++ b/plugins/dfinput/Makefile.am
@@ -13,9 +13,31 @@ AM_CPPFLAGS = -DLOCALE_DIR=\"${datadir}/locale/\" \
-I../../include -I$(top_srcdir)/libpcsxcore $(SDL2_CFLAGS) $(SDL_CFLAGS)
bin_PROGRAMS = cfgDFInput
-cfgDFInput_SOURCES = cfg-gtk.c pad.h
+cfgDFInput_SOURCES = cfg-gtk.c pad.h GtkResources.c GtkResources.h
cfgDFInput_LDADD = $(GTK3_LIBS) $(SDL2_LIBS) $(SDL_LIBS) -lX11
-glade_DATA = dfinput.ui
-gladedir = $(datadir)/psemu/
+# gresource.xml is dynamically generated in CMake. Mirror that here in a static way.
+define gresource_xml =
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+ <gresource prefix="/org/pcsxr/dfinput">
+ <file>dfinput.ui</file>
+ </gresource>
+</gresources>
+endef
+
+dfinput.gresource.xml:
+ $(file >$@,$(gresource_xml))
+dfinput_gresource: dfinput.gresource.xml
+ $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/$<)
+GtkResources.c: dfinput.gresource.xml $(dfinput_gresource)
+ $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) --generate-source --c-name dfinput $<
+GtkResources.h: dfinput.gresource.xml $(dfinput_gresource)
+ $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) --generate-header --c-name dfinput $<
+
+
+#glade_DATA = dfinput.ui
+#gladedir = $(datadir)/psemu/
EXTRA_DIST = $(glade_DATA)
+
+CLEANFILES = dfinput.gresource.xml GtkResources.c GtkResources.h
diff --git a/plugins/dfinput/cfg-gtk.c b/plugins/dfinput/cfg-gtk.c
index 5f26040f..bcc733d1 100755
--- a/plugins/dfinput/cfg-gtk.c
+++ b/plugins/dfinput/cfg-gtk.c
@@ -246,7 +246,6 @@ static void UpdateKeyList() {
gtk_tree_view_set_model(GTK_TREE_VIEW(widget), GTK_TREE_MODEL(store));
g_object_unref(G_OBJECT(store));
- gtk_tree_view_set_rules_hint(GTK_TREE_VIEW(widget), TRUE);
gtk_widget_show(widget);
}
}
@@ -327,6 +326,7 @@ static void OnDeviceChanged(GtkWidget *widget, gpointer user_data) {
static void OnTypeChanged(GtkWidget *widget, gpointer user_data) {
uint n = GPOINTER_TO_UINT(user_data), current = gtk_combo_box_get_active(GTK_COMBO_BOX(widget));
+ char checkbtn[9];
int padTypeList[] = {
PSE_PAD_TYPE_STANDARD,
@@ -336,6 +336,10 @@ static void OnTypeChanged(GtkWidget *widget, gpointer user_data) {
g.cfg.PadDef[n].Type = padTypeList[current];
+ snprintf(checkbtn, sizeof(checkbtn), "checkpv%d", n+1);
+ gtk_widget_set_sensitive(GTK_WIDGET(
+ gtk_builder_get_object(xml, checkbtn)), (g.cfg.PadDef[n].Type == PSE_PAD_TYPE_ANALOGPAD));
+
UpdateKeyList();
}
@@ -351,6 +355,14 @@ static void OnVisualVibration2Toggled(GtkWidget *widget, gpointer user_data) {
g.cfg.PadDef[1].VisualVibration = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
}
+static void OnPhysicalVibration1Toggled(GtkWidget *widget, gpointer user_data) {
+ g.cfg.PadDef[0].PhysicalVibration = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
+}
+
+static void OnPhysicalVibration2Toggled(GtkWidget *widget, gpointer user_data) {
+ g.cfg.PadDef[1].PhysicalVibration = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
+}
+
static void OnHideCursorToggled(GtkWidget *widget, gpointer user_data) {
(void)user_data; // unused
g.cfg.HideCursor = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
@@ -612,9 +624,9 @@ static void PopulateDevList() {
for (j = 0; j < n; j++) {
#if SDL_VERSION_ATLEAST(2, 0, 0)
SDL_Joystick *joystick = SDL_JoystickOpen(j);
- sprintf(buf, "%d: %s", j + 1, SDL_JoystickName(joystick));
+ snprintf(buf, sizeof(buf), "%d: %s", j + 1, SDL_JoystickName(joystick));
#else
- sprintf(buf, "%d: %s", j + 1, SDL_JoystickName(j));
+ snprintf(buf, sizeof(buf), "%d: %s", j + 1, SDL_JoystickName(j));
#endif
gtk_list_store_append(store, &iter);
gtk_list_store_set(store, &iter, 0, buf, -1);
@@ -655,7 +667,7 @@ long PADconfigure() {
xml = gtk_builder_new();
- if (!gtk_builder_add_from_file(xml, DATADIR "dfinput.ui", NULL)) {
+ if (!gtk_builder_add_from_resource(xml, "/org/pcsxr/dfinput/dfinput.ui", NULL)) {
g_warning("We could not load the interface!");
return -1;
}
@@ -748,12 +760,14 @@ long PADconfigure() {
widget = GTK_WIDGET(gtk_builder_get_object(xml, "combotype1"));
gtk_combo_box_set_active(GTK_COMBO_BOX(widget),
padTypeList[g.cfg.PadDef[0].Type]);
+ OnTypeChanged(widget, GUINT_TO_POINTER(0u));
g_signal_connect_data(G_OBJECT(widget), "changed",
G_CALLBACK(OnTypeChanged), GUINT_TO_POINTER(0u), NULL, G_CONNECT_AFTER);
widget = GTK_WIDGET(gtk_builder_get_object(xml, "combotype2"));
gtk_combo_box_set_active(GTK_COMBO_BOX(widget),
padTypeList[g.cfg.PadDef[1].Type]);
+ OnTypeChanged(widget, GUINT_TO_POINTER(1u));
g_signal_connect_data(G_OBJECT(widget), "changed",
G_CALLBACK(OnTypeChanged), GUINT_TO_POINTER(1u), NULL, G_CONNECT_AFTER);
@@ -767,6 +781,16 @@ long PADconfigure() {
g_signal_connect_data(G_OBJECT(widget), "toggled",
G_CALLBACK(OnVisualVibration2Toggled), NULL, NULL, G_CONNECT_AFTER);
+ widget = GTK_WIDGET(gtk_builder_get_object(xml, "checkpv1"));
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), g.cfg.PadDef[0].PhysicalVibration);
+ g_signal_connect_data(G_OBJECT(widget), "toggled",
+ G_CALLBACK(OnPhysicalVibration1Toggled), NULL, NULL, G_CONNECT_AFTER);
+
+ widget = GTK_WIDGET(gtk_builder_get_object(xml, "checkpv2"));
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), g.cfg.PadDef[1].PhysicalVibration);
+ g_signal_connect_data(G_OBJECT(widget), "toggled",
+ G_CALLBACK(OnPhysicalVibration2Toggled), NULL, NULL, G_CONNECT_AFTER);
+
widget = GTK_WIDGET(gtk_builder_get_object(xml, widgetname_change[1]));
gtk_widget_set_sensitive(widget, FALSE);
g_signal_connect_data(G_OBJECT(widget), "clicked",
@@ -837,6 +861,7 @@ void PADabout() {
GtkWidget *widget;
widget = gtk_about_dialog_new();
+ gtk_about_dialog_set_logo_icon_name (GTK_ABOUT_DIALOG(widget), "help-about");
gtk_about_dialog_set_program_name(GTK_ABOUT_DIALOG(widget), "Gamepad/Keyboard Input");
gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(widget), "1.2");
gtk_about_dialog_set_authors(GTK_ABOUT_DIALOG(widget), authors);
diff --git a/plugins/dfinput/cfg.c b/plugins/dfinput/cfg.c
index f1d16673..622c3c34 100755
--- a/plugins/dfinput/cfg.c
+++ b/plugins/dfinput/cfg.c
@@ -37,6 +37,8 @@ static void SetDefaultConfig() {
g.cfg.PadDef[0].VisualVibration = 0;
g.cfg.PadDef[1].VisualVibration = 0;
+ g.cfg.PadDef[0].PhysicalVibration = 1;
+ g.cfg.PadDef[1].PhysicalVibration = 1;
// Pad1 keyboard
g.cfg.PadDef[0].KeyDef[DKEY_SELECT].Key = XK_c;
@@ -164,6 +166,8 @@ void LoadPADConfig() {
g.cfg.PadDef[current].Type = atoi(&buf[5]);
} else if (strncmp(buf, "VisualVibration=", 16) == 0) {
g.cfg.PadDef[current].VisualVibration = atoi(&buf[16]);
+ } else if (strncmp(buf, "PhysicalVibration=", 18) == 0) {
+ g.cfg.PadDef[current].PhysicalVibration = atoi(&buf[18]);
} else if (strncmp(buf, "EmuDev=", 7) == 0) {
g.cfg.E.DevNum = atoi(&buf[5]);
} else if (strncmp(buf, "EMU_FASTFORWARDS=", 17) == 0) {
@@ -362,6 +366,7 @@ void SavePADConfig() {
fprintf(fp, "DevNum=%d\n", g.cfg.PadDef[i].DevNum);
fprintf(fp, "Type=%d\n", g.cfg.PadDef[i].Type);
fprintf(fp, "VisualVibration=%d\n", g.cfg.PadDef[i].VisualVibration);
+ fprintf(fp, "PhysicalVibration=%d\n", g.cfg.PadDef[i].PhysicalVibration);
fprintf(fp, "Select=%d,%d,%d\n", g.cfg.PadDef[i].KeyDef[DKEY_SELECT].Key,
g.cfg.PadDef[i].KeyDef[DKEY_SELECT].JoyEvType, g.cfg.PadDef[i].KeyDef[DKEY_SELECT].J.d);
diff --git a/plugins/dfinput/dfinput.ui b/plugins/dfinput/dfinput.ui
index 17dfbdb9..2d291e22 100644
--- a/plugins/dfinput/dfinput.ui
+++ b/plugins/dfinput/dfinput.ui
@@ -1,23 +1,58 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.20.0 -->
<interface>
- <!-- interface-requires gtk+ 3.0 -->
+ <requires lib="gtk+" version="3.14"/>
+ <object class="GtkListStore" id="liststore1">
+ <columns>
+ <!-- column-name item -->
+ <column type="gchararray"/>
+ </columns>
+ <data>
+ <row>
+ <col id="0" translatable="yes">Digital Pad</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Analog Pad</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Mouse</col>
+ </row>
+ </data>
+ </object>
+ <object class="GtkListStore" id="liststore2">
+ <columns>
+ <!-- column-name item -->
+ <column type="gchararray"/>
+ </columns>
+ <data>
+ <row>
+ <col id="0" translatable="yes">Digital Pad</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Analog Pad</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Mouse</col>
+ </row>
+ </data>
+ </object>
<object class="GtkWindow" id="CfgWnd">
<property name="can_focus">False</property>
<child>
- <object class="GtkTable" id="table1">
+ <object class="GtkGrid" id="table1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">5</property>
- <property name="n_rows">2</property>
<child>
<object class="GtkNotebook" id="notebook1">
<property name="visible">True</property>
<property name="can_focus">True</property>
<child>
- <object class="GtkVBox" id="vbox1">
+ <object class="GtkBox" id="vbox1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">5</property>
+ <property name="orientation">vertical</property>
<property name="spacing">2</property>
<child>
<object class="GtkGrid" id="grid1">
@@ -29,14 +64,11 @@
<object class="GtkLabel" id="label10">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
<property name="label" translatable="yes">Device:</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -47,22 +79,17 @@
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label5">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
<property name="label" translatable="yes">Type:</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -80,8 +107,6 @@
<packing>
<property name="left_attach">1</property>
<property name="top_attach">1</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
</object>
@@ -92,13 +117,37 @@
</packing>
</child>
<child>
- <object class="GtkCheckButton" id="checkvv1">
- <property name="label" translatable="yes">Visual vibration</property>
+ <object class="GtkBox">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="xalign">0</property>
- <property name="draw_indicator">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkCheckButton" id="checkvv1">
+ <property name="label" translatable="yes">Visual vibration</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="checkpv1">
+ <property name="label" translatable="yes">Physical vibration</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>
</object>
<packing>
<property name="expand">False</property>
@@ -113,7 +162,6 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="border_width">5</property>
- <property name="window_placement_set">True</property>
<property name="shadow_type">etched-in</property>
<child>
<object class="GtkTreeView" id="treeview1">
@@ -132,7 +180,7 @@
</packing>
</child>
<child>
- <object class="GtkHButtonBox" id="hbuttonbox2">
+ <object class="GtkButtonBox" id="hbuttonbox2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">20</property>
@@ -143,7 +191,7 @@
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<child>
- <object class="GtkHBox" id="hbox1">
+ <object class="GtkBox" id="hbox1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
@@ -151,7 +199,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="stock">gtk-edit</property>
- <property name="icon-size">1</property>
+ <property name="icon_size">1</property>
</object>
<packing>
<property name="expand">True</property>
@@ -186,7 +234,7 @@
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<child>
- <object class="GtkHBox" id="hbox2">
+ <object class="GtkBox" id="hbox2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
@@ -194,7 +242,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="stock">gtk-undo</property>
- <property name="icon-size">1</property>
+ <property name="icon_size">1</property>
</object>
<packing>
<property name="expand">True</property>
@@ -243,10 +291,11 @@
</packing>
</child>
<child>
- <object class="GtkVBox" id="vbox2">
+ <object class="GtkBox" id="vbox2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">5</property>
+ <property name="orientation">vertical</property>
<property name="spacing">2</property>
<child>
<object class="GtkGrid" id="grid2">
@@ -258,14 +307,11 @@
<object class="GtkLabel" id="label11">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
<property name="label" translatable="yes">Device:</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -276,22 +322,17 @@
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label7">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
<property name="label" translatable="yes">Type:</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -309,8 +350,6 @@
<packing>
<property name="left_attach">1</property>
<property name="top_attach">1</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
</object>
@@ -321,13 +360,37 @@
</packing>
</child>
<child>
- <object class="GtkCheckButton" id="checkvv2">
- <property name="label" translatable="yes">Visual vibration</property>
+ <object class="GtkBox">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="xalign">0</property>
- <property name="draw_indicator">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkCheckButton" id="checkvv2">
+ <property name="label" translatable="yes">Visual vibration</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="checkpv2">
+ <property name="label" translatable="yes">Physical vibration</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>
</object>
<packing>
<property name="expand">False</property>
@@ -342,7 +405,6 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="border_width">5</property>
- <property name="window_placement_set">True</property>
<property name="shadow_type">etched-in</property>
<child>
<object class="GtkTreeView" id="treeview2">
@@ -361,7 +423,7 @@
</packing>
</child>
<child>
- <object class="GtkHButtonBox" id="hbuttonbox3">
+ <object class="GtkButtonBox" id="hbuttonbox3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">20</property>
@@ -372,7 +434,7 @@
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<child>
- <object class="GtkHBox" id="hbox3">
+ <object class="GtkBox" id="hbox3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
@@ -380,7 +442,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="stock">gtk-edit</property>
- <property name="icon-size">1</property>
+ <property name="icon_size">1</property>
</object>
<packing>
<property name="expand">True</property>
@@ -415,7 +477,7 @@
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<child>
- <object class="GtkHBox" id="hbox4">
+ <object class="GtkBox" id="hbox4">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
@@ -423,7 +485,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="stock">gtk-undo</property>
- <property name="icon-size">1</property>
+ <property name="icon_size">1</property>
</object>
<packing>
<property name="expand">True</property>
@@ -471,14 +533,16 @@
<property name="label" translatable="yes">Controller 2</property>
</object>
<packing>
+ <property name="position">1</property>
<property name="tab_fill">False</property>
</packing>
</child>
<child>
- <object class="GtkVBox" id="vbox_e">
+ <object class="GtkBox" id="vbox_e">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">5</property>
+ <property name="orientation">vertical</property>
<property name="spacing">2</property>
<child>
<object class="GtkGrid" id="grid_e">
@@ -490,14 +554,11 @@
<object class="GtkLabel" id="label_e2">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
<property name="label" translatable="yes">Device:</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -508,8 +569,6 @@
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
</object>
@@ -526,7 +585,6 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="border_width">5</property>
- <property name="window_placement_set">True</property>
<property name="shadow_type">etched-in</property>
<child>
<object class="GtkTreeView" id="treeview_e">
@@ -545,7 +603,7 @@
</packing>
</child>
<child>
- <object class="GtkHButtonBox" id="hbuttonbox_e">
+ <object class="GtkButtonBox" id="hbuttonbox_e">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">20</property>
@@ -556,7 +614,7 @@
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<child>
- <object class="GtkHBox" id="hbox_e1">
+ <object class="GtkBox" id="hbox_e1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
@@ -564,7 +622,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="stock">gtk-edit</property>
- <property name="icon-size">1</property>
+ <property name="icon_size">1</property>
</object>
<packing>
<property name="expand">True</property>
@@ -599,7 +657,7 @@
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<child>
- <object class="GtkHBox" id="hbox_e2">
+ <object class="GtkBox" id="hbox_e2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
@@ -607,7 +665,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="stock">gtk-undo</property>
- <property name="icon-size">1</property>
+ <property name="icon_size">1</property>
</object>
<packing>
<property name="expand">True</property>
@@ -655,14 +713,16 @@
<property name="label" translatable="yes">Emulator keys</property>
</object>
<packing>
+ <property name="position">2</property>
<property name="tab_fill">False</property>
</packing>
</child>
<child>
- <object class="GtkVBox" id="vbox3">
+ <object class="GtkBox" id="vbox3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">5</property>
+ <property name="orientation">vertical</property>
<property name="spacing">5</property>
<child>
<object class="GtkCheckButton" id="checkmt">
@@ -670,7 +730,6 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
- <property name="xalign">0</property>
<property name="draw_indicator">True</property>
</object>
<packing>
@@ -685,7 +744,6 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
- <property name="xalign">0</property>
<property name="draw_indicator">True</property>
</object>
<packing>
@@ -700,7 +758,6 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
- <property name="xalign">0</property>
<property name="draw_indicator">True</property>
</object>
<packing>
@@ -726,9 +783,13 @@
</packing>
</child>
</object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ </packing>
</child>
<child>
- <object class="GtkHButtonBox" id="dialog-action_area1">
+ <object class="GtkButtonBox" id="dialog-action_area1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="layout_style">end</property>
@@ -748,46 +809,14 @@
</child>
</object>
<packing>
+ <property name="left_attach">0</property>
<property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_options">GTK_FILL</property>
</packing>
</child>
</object>
</child>
- </object>
- <object class="GtkListStore" id="liststore1">
- <columns>
- <!-- column-name item -->
- <column type="gchararray"/>
- </columns>
- <data>
- <row>
- <col id="0" translatable="yes">Digital Pad</col>
- </row>
- <row>
- <col id="0" translatable="yes">Analog Pad</col>
- </row>
- <row>
- <col id="0" translatable="yes">Mouse</col>
- </row>
- </data>
- </object>
- <object class="GtkListStore" id="liststore2">
- <columns>
- <!-- column-name item -->
- <column type="gchararray"/>
- </columns>
- <data>
- <row>
- <col id="0" translatable="yes">Digital Pad</col>
- </row>
- <row>
- <col id="0" translatable="yes">Analog Pad</col>
- </row>
- <row>
- <col id="0" translatable="yes">Mouse</col>
- </row>
- </data>
+ <child type="titlebar">
+ <placeholder/>
+ </child>
</object>
</interface>
diff --git a/plugins/dfinput/pad.c b/plugins/dfinput/pad.c
index bd3aef73..f413d0a4 100755
--- a/plugins/dfinput/pad.c
+++ b/plugins/dfinput/pad.c
@@ -17,11 +17,15 @@
*/
#include "pad.h"
-#if !SDL_VERSION_ATLEAST(2,0,0) && defined(__linux__)
+#if defined(__linux__)
+#include <sys/types.h>
+#include <sys/wait.h>
+#if !SDL_VERSION_ATLEAST(2,0,0)
#include <linux/input.h>
#include <sys/file.h>
#include <time.h>
#endif
+#endif
#if SDL_VERSION_ATLEAST(2,0,0)
int has_haptic;
@@ -122,10 +126,10 @@ long PADopen(unsigned long *Disp) {
#if SDL_VERSION_ATLEAST(2,0,0)
SDL_InitSubSystem(SDL_INIT_GAMECONTROLLER);
-
- has_haptic = 0;
- if (SDL_InitSubSystem(SDL_INIT_HAPTIC) == 0)
- has_haptic = 1;
+
+ has_haptic = 0;
+ if (SDL_InitSubSystem(SDL_INIT_HAPTIC) == 0)
+ has_haptic = 1;
#endif
InitSDLJoy();
@@ -491,7 +495,7 @@ unsigned char PADpoll(unsigned char value) {
if (buf == NULL) {
return 0;
}
-
+
switch (CurCmd) {
case CMD_READ_DATA_AND_VIBRATE:
if (g.cfg.PadDef[CurPad].Type == PSE_PAD_TYPE_ANALOGPAD) {
@@ -510,7 +514,7 @@ unsigned char PADpoll(unsigned char value) {
if (!JoyHapticRumble(CurPad, g.PadState[CurPad].VibF[0], g.PadState[CurPad].VibF[1])) {
//gpuVisualVibration(g.PadState[CurPad].VibF[0], g.PadState[CurPad].VibF[1]);
}
-
+
if(gpuVisualVibration != NULL &&
g.cfg.PadDef[CurPad].VisualVibration) {
gpuVisualVibration(g.PadState[CurPad].VibF[0], g.PadState[CurPad].VibF[1]);
diff --git a/plugins/dfinput/pad.h b/plugins/dfinput/pad.h
index 7cd8eefe..3051e6ad 100755
--- a/plugins/dfinput/pad.h
+++ b/plugins/dfinput/pad.h
@@ -158,6 +158,7 @@ typedef struct tagPadDef {
int8_t DevNum;
uint16_t Type;
uint8_t VisualVibration;
+ uint8_t PhysicalVibration;
KEYDEF KeyDef[DKEY_TOTAL];
KEYDEF AnalogDef[ANALOG_TOTAL][4];
#if SDL_VERSION_ATLEAST(2,0,0)
diff --git a/plugins/dfinput/sdljoy.c b/plugins/dfinput/sdljoy.c
index ee139517..3e8cc993 100755
--- a/plugins/dfinput/sdljoy.c
+++ b/plugins/dfinput/sdljoy.c
@@ -64,7 +64,7 @@ int JoyHapticRumble(int pad, uint32_t low, uint32_t high)
#if SDL_VERSION_ATLEAST(2,0,0)
float mag;
- if (g.PadState[pad].haptic) {
+ if (g.PadState[pad].haptic && g.cfg.PadDef[pad].PhysicalVibration) {
/* Stop the effect if it was playing. */
SDL_HapticRumbleStop(g.PadState[pad].haptic);
@@ -74,7 +74,7 @@ int JoyHapticRumble(int pad, uint32_t low, uint32_t high)
if(SDL_HapticRumblePlay(g.PadState[pad].haptic, mag, 500) != 0)
{
- printf("\nFailed to play rumble: %s\n", SDL_GetError());
+ printf("\nFailed to play rumble on pad %d with error: %s\n", pad, SDL_GetError());
return 1;
}
}
diff --git a/plugins/dfinput/xkb.c b/plugins/dfinput/xkb.c
index 53fb90d4..47eac669 100755
--- a/plugins/dfinput/xkb.c
+++ b/plugins/dfinput/xkb.c
@@ -46,7 +46,7 @@ void InitKeyboard() {
resumeScrSaver = 0;
if (g.cfg.PreventScrSaver) {
char buf[64];
- snprintf(buf, 64, "xdg-screensaver suspend 0x%x > /dev/null 2>&1", window);
+ snprintf(buf, sizeof(buf), "xdg-screensaver suspend 0x%x > /dev/null 2>&1", window);
if (pclose(popen(buf, "r")) == 0) {
resumeScrSaver = 1;
printf("Suspending Window ID 0x%x of activating screensaver.\n", window);
@@ -79,7 +79,7 @@ void DestroyKeyboard() {
if (resumeScrSaver) {
char buf[64];
printf("Resuming Window ID 0x%x to activate screensaver.\n", window);
- snprintf(buf, 64, "xdg-screensaver resume 0x%x", window);
+ snprintf(buf, sizeof(buf), "xdg-screensaver resume 0x%x", window);
FILE *phandle = popen(buf, "r");
pclose(phandle);
}
diff --git a/plugins/dfnet/Makefile.am b/plugins/dfnet/Makefile.am
index d639c652..f0a53ea0 100755
--- a/plugins/dfnet/Makefile.am
+++ b/plugins/dfnet/Makefile.am
@@ -12,9 +12,31 @@ AM_CPPFLAGS = -DLOCALE_DIR=\"${datadir}/locale/\" \
-I$(top_srcdir)/libpcsxcore -I../../include
bin_PROGRAMS = cfgDFNet
-cfgDFNet_SOURCES = gui.c
+cfgDFNet_SOURCES = gui.c GtkResources.c GtkResources.h
cfgDFNet_LDADD = $(GTK3_LIBS)
-glade_DATA = dfnet.ui
-gladedir = $(datadir)/psemu/
+# gresource.xml is dynamically generated in CMake. Mirror that here in a static way.
+define gresource_xml =
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+ <gresource prefix="/org/pcsxr/dfnet">
+ <file>dfnet.ui</file>
+ </gresource>
+</gresources>
+endef
+
+dfnet.gresource.xml:
+ $(file >$@,$(gresource_xml))
+dfnet_gresource: dfnet.gresource.xml
+ $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/$<)
+GtkResources.c: dfnet.gresource.xml $(dfnet_gresource)
+ $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) --generate-source --c-name dfnet $<
+GtkResources.h: dfnet.gresource.xml $(dfnet_gresource)
+ $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) --generate-header --c-name dfnet $<
+
+
+#glade_DATA = dfnet.ui
+#gladedir = $(datadir)/psemu/
EXTRA_DIST = $(glade_DATA)
+
+CLEANFILES = dfnet.gresource.xml GtkResources.c GtkResources.h
diff --git a/plugins/dfnet/dfnet.ui b/plugins/dfnet/dfnet.ui
index bdad3a1d..7ab884c2 100755..100644
--- a/plugins/dfnet/dfnet.ui
+++ b/plugins/dfnet/dfnet.ui
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.19.0 -->
<interface>
- <!-- interface-requires gtk+ 3.0 -->
+ <requires lib="gtk+" version="3.0"/>
<object class="GtkDialog" id="dlgStart">
<property name="can_focus">False</property>
<property name="border_width">5</property>
@@ -25,7 +26,7 @@
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<child>
- <object class="GtkHBox" id="hbox3">
+ <object class="GtkBox" id="hbox3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
@@ -44,8 +45,8 @@
<object class="GtkLabel" id="label5">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
<property name="label" translatable="yes">Start Game</property>
+ <property name="xalign">0</property>
</object>
<packing>
<property name="expand">True</property>
@@ -68,7 +69,7 @@
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<child>
- <object class="GtkHBox" id="hbox4">
+ <object class="GtkBox" id="hbox4">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
@@ -87,8 +88,8 @@
<object class="GtkLabel" id="label6">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
<property name="label" translatable="yes">Play Offline</property>
+ <property name="xalign">0</property>
</object>
<packing>
<property name="expand">True</property>
@@ -114,9 +115,10 @@
</packing>
</child>
<child>
- <object class="GtkVBox" id="vbox1">
+ <object class="GtkBox" id="vbox1">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
<property name="spacing">12</property>
<child>
<object class="GtkLabel" id="label1">
@@ -136,20 +138,18 @@ If you selected Client please enter the IP address the Server gave to you in the
</packing>
</child>
<child>
- <object class="GtkTable" id="table1">
+ <object class="GtkGrid" id="table1">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="n_rows">2</property>
- <property name="n_columns">2</property>
- <property name="column_spacing">8</property>
<property name="row_spacing">12</property>
+ <property name="column_spacing">8</property>
<child>
<object class="GtkButton" id="btnCopyIP">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<child>
- <object class="GtkHBox" id="hbox2">
+ <object class="GtkBox" id="hbox2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
@@ -168,8 +168,8 @@ If you selected Client please enter the IP address the Server gave to you in the
<object class="GtkLabel" id="label4">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
<property name="label" translatable="yes">Copy PC IP to Clipboard</property>
+ <property name="xalign">0</property>
</object>
<packing>
<property name="expand">True</property>
@@ -182,7 +182,7 @@ If you selected Client please enter the IP address the Server gave to you in the
</object>
<packing>
<property name="left_attach">1</property>
- <property name="right_attach">2</property>
+ <property name="top_attach">0</property>
</packing>
</child>
<child>
@@ -195,9 +195,7 @@ If you selected Client please enter the IP address the Server gave to you in the
</object>
<packing>
<property name="left_attach">1</property>
- <property name="right_attach">2</property>
<property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
</packing>
</child>
<child>
@@ -210,6 +208,10 @@ If you selected Client please enter the IP address the Server gave to you in the
<property name="active">True</property>
<property name="draw_indicator">True</property>
</object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ </packing>
</child>
<child>
<object class="GtkRadioButton" id="rbClient">
@@ -223,8 +225,8 @@ If you selected Client please enter the IP address the Server gave to you in the
<property name="group">rbServer</property>
</object>
<packing>
+ <property name="left_attach">0</property>
<property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
</packing>
</child>
</object>
@@ -236,9 +238,10 @@ If you selected Client please enter the IP address the Server gave to you in the
</packing>
</child>
<child>
- <object class="GtkVBox" id="vbox2">
+ <object class="GtkBox" id="vbox2">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<object class="GtkLabel" id="label2">
@@ -254,15 +257,15 @@ If you selected Client please enter the IP address the Server gave to you in the
</packing>
</child>
<child>
- <object class="GtkHBox" id="hbox1">
+ <object class="GtkBox" id="hbox1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkLabel" id="label3">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
<property name="label" translatable="yes">Port Number</property>
+ <property name="xalign">0</property>
</object>
<packing>
<property name="expand">True</property>
diff --git a/plugins/dfnet/gui.c b/plugins/dfnet/gui.c
index 06c4b888..85d0871f 100755
--- a/plugins/dfnet/gui.c
+++ b/plugins/dfnet/gui.c
@@ -103,7 +103,7 @@ long CFGopen() {
builder = gtk_builder_new();
- if (!gtk_builder_add_from_file(builder, DATADIR "dfnet.ui", NULL)) {
+ if (!gtk_builder_add_from_resource(builder, "/org/pcsxr/dfnet/dfnet.ui", NULL)) {
g_warning("We could not load the interface!");
return 0;
}
@@ -182,6 +182,7 @@ void CFGabout() {
GtkWidget *widget;
widget = gtk_about_dialog_new();
+ gtk_about_dialog_set_logo_icon_name (GTK_ABOUT_DIALOG(widget), "help-about");
gtk_about_dialog_set_program_name(GTK_ABOUT_DIALOG(widget), "Socket NetPlay Driver");
gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(widget), "0.21");
gtk_about_dialog_set_authors(GTK_ABOUT_DIALOG(widget), authors);
diff --git a/plugins/dfsound/Makefile.am b/plugins/dfsound/Makefile.am
index 53255556..9f8130a1 100755
--- a/plugins/dfsound/Makefile.am
+++ b/plugins/dfsound/Makefile.am
@@ -49,9 +49,31 @@ bin_PROGRAMS = cfgDFSound
cfgDFSound_CPPFLAGS = -DLOCALE_DIR=\"${datadir}/locale/\" \
-DDATADIR=\"${datadir}/psemu/\" \
$(GTK3_CFLAGS) $(AM_CPPFLAGS)
-cfgDFSound_SOURCES = spucfg-0.1df/main.c
+cfgDFSound_SOURCES = spucfg-0.1df/main.c GtkResources.c GtkResources.h
cfgDFSound_LDADD = $(GTK3_LIBS)
-glade_DATA = spucfg-0.1df/dfsound.ui
-gladedir = $(datadir)/psemu/
+# gresource.xml is dynamically generated in CMake. Mirror that here in a static way.
+define gresource_xml =
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+ <gresource prefix="/org/pcsxr/dfsound">
+ <file>dfsound.ui</file>
+ </gresource>
+</gresources>
+endef
+
+dfsound.gresource.xml:
+ $(file >$@,$(gresource_xml))
+dfsound_gresource: dfsound.gresource.xml
+ $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(srcdir)/spucfg-0.1df --generate-dependencies $(srcdir)/$<)
+GtkResources.c: dfsound.gresource.xml $(dfsound_gresource)
+ $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir)/spucfg-0.1df --generate-source --c-name dfsound $<
+GtkResources.h: dfsound.gresource.xml $(dfsound_gresource)
+ $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir)/spucfg-0.1df --generate-header --c-name dfsound $<
+
+#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/dfsound/spucfg-0.1df/dfsound.ui b/plugins/dfsound/spucfg-0.1df/dfsound.ui
index 1c816a1d..9d897204 100755..100644
--- a/plugins/dfsound/spucfg-0.1df/dfsound.ui
+++ b/plugins/dfsound/spucfg-0.1df/dfsound.ui
@@ -1,6 +1,67 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.19.0 -->
<interface>
- <!-- interface-requires gtk+ 3.0 -->
+ <requires lib="gtk+" version="3.0"/>
+ <object class="GtkListStore" id="liststoreInterpolation">
+ <columns>
+ <!-- column-name Item -->
+ <column type="gchararray"/>
+ </columns>
+ <data>
+ <row>
+ <col id="0" translatable="yes">None</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Simple</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Gaussian</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Cubic</col>
+ </row>
+ </data>
+ </object>
+ <object class="GtkListStore" id="liststoreReverb">
+ <columns>
+ <!-- column-name Item -->
+ <column type="gchararray"/>
+ </columns>
+ <data>
+ <row>
+ <col id="0" translatable="yes">Off</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Simple</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Playstation</col>
+ </row>
+ </data>
+ </object>
+ <object class="GtkListStore" id="liststoreVolume">
+ <columns>
+ <!-- column-name Item -->
+ <column type="gchararray"/>
+ </columns>
+ <data>
+ <row>
+ <col id="0" translatable="yes">None</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Low</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Medium</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Loud</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Loudest</col>
+ </row>
+ </data>
+ </object>
<object class="GtkDialog" id="CfgWnd">
<property name="can_focus">False</property>
<property name="border_width">5</property>
@@ -42,9 +103,10 @@
</packing>
</child>
<child>
- <object class="GtkVBox" id="vbox1">
+ <object class="GtkBox" id="vbox1">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<object class="GtkFrame" id="frame1">
@@ -57,54 +119,49 @@
<property name="can_focus">False</property>
<property name="border_width">5</property>
<child>
- <object class="GtkTable" id="table1">
+ <object class="GtkGrid" id="table1">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="n_rows">3</property>
- <property name="n_columns">2</property>
- <property name="column_spacing">5</property>
<property name="row_spacing">5</property>
+ <property name="column_spacing">5</property>
+ <property name="column_homogeneous">True</property>
<child>
<object class="GtkLabel" id="label1v">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
<property name="label" translatable="yes">Volume:</property>
<property name="justify">right</property>
+ <property name="xalign">0</property>
</object>
<packing>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label9">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
<property name="label" translatable="yes">Interpolation:</property>
<property name="justify">right</property>
+ <property name="xalign">0</property>
</object>
<packing>
+ <property name="left_attach">0</property>
<property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label8">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
<property name="label" translatable="yes">Reverb:</property>
<property name="justify">right</property>
+ <property name="xalign">0</property>
</object>
<packing>
+ <property name="left_attach">0</property>
<property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
</packing>
</child>
<child>
@@ -121,8 +178,7 @@
</object>
<packing>
<property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="y_options">GTK_FILL</property>
+ <property name="top_attach">0</property>
</packing>
</child>
<child>
@@ -139,11 +195,7 @@
</object>
<packing>
<property name="left_attach">1</property>
- <property name="right_attach">2</property>
<property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
@@ -160,11 +212,7 @@
</object>
<packing>
<property name="left_attach">1</property>
- <property name="right_attach">2</property>
<property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options">GTK_FILL</property>
</packing>
</child>
</object>
@@ -189,9 +237,10 @@
<property name="can_focus">False</property>
<property name="border_width">5</property>
<child>
- <object class="GtkVBox" id="vbox3">
+ <object class="GtkBox" id="vbox3">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<object class="GtkCheckButton" id="chkXASpeed">
@@ -234,9 +283,10 @@
<property name="can_focus">False</property>
<property name="border_width">5</property>
<child>
- <object class="GtkVBox" id="vbox4">
+ <object class="GtkBox" id="vbox4">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<object class="GtkCheckButton" id="chkHiCompat">
@@ -334,64 +384,4 @@
<action-widget response="0">btn_close</action-widget>
</action-widgets>
</object>
- <object class="GtkListStore" id="liststoreInterpolation">
- <columns>
- <!-- column-name Item -->
- <column type="gchararray"/>
- </columns>
- <data>
- <row>
- <col id="0" translatable="yes">None</col>
- </row>
- <row>
- <col id="0" translatable="yes">Simple</col>
- </row>
- <row>
- <col id="0" translatable="yes">Gaussian</col>
- </row>
- <row>
- <col id="0" translatable="yes">Cubic</col>
- </row>
- </data>
- </object>
- <object class="GtkListStore" id="liststoreReverb">
- <columns>
- <!-- column-name Item -->
- <column type="gchararray"/>
- </columns>
- <data>
- <row>
- <col id="0" translatable="yes">Off</col>
- </row>
- <row>
- <col id="0" translatable="yes">Simple</col>
- </row>
- <row>
- <col id="0" translatable="yes">Playstation</col>
- </row>
- </data>
- </object>
- <object class="GtkListStore" id="liststoreVolume">
- <columns>
- <!-- column-name Item -->
- <column type="gchararray"/>
- </columns>
- <data>
- <row>
- <col id="0" translatable="yes">None</col>
- </row>
- <row>
- <col id="0" translatable="yes">Low</col>
- </row>
- <row>
- <col id="0" translatable="yes">Medium</col>
- </row>
- <row>
- <col id="0" translatable="yes">Loud</col>
- </row>
- <row>
- <col id="0" translatable="yes">Loudest</col>
- </row>
- </data>
- </object>
</interface>
diff --git a/plugins/dfsound/spucfg-0.1df/main.c b/plugins/dfsound/spucfg-0.1df/main.c
index 2a57a67f..2fe837b7 100755
--- a/plugins/dfsound/spucfg-0.1df/main.c
+++ b/plugins/dfsound/spucfg-0.1df/main.c
@@ -82,6 +82,7 @@ int main(int argc, char *argv[])
if (strcmp(argv[1], "about") == 0) {
const char *authors[]= {"Pete Bernert and the P.E.Op.S. team", "Ryan Schultz", "Andrew Burton", NULL};
widget = gtk_about_dialog_new ();
+ gtk_about_dialog_set_logo_icon_name (GTK_ABOUT_DIALOG(widget), "help-about");
gtk_about_dialog_set_program_name (GTK_ABOUT_DIALOG (widget), "dfsound PCSXR Sound Plugin");
gtk_about_dialog_set_version (GTK_ABOUT_DIALOG (widget), "1.6");
gtk_about_dialog_set_authors (GTK_ABOUT_DIALOG (widget), authors);
@@ -98,7 +99,7 @@ int main(int argc, char *argv[])
else if (strcmp(argv[1], "configure") == 0) {
builder = gtk_builder_new();
- if (!gtk_builder_add_from_file(builder, DATADIR "dfsound.ui", NULL)) {
+ if (!gtk_builder_add_from_resource(builder, "/org/pcsxr/dfsound/dfsound.ui", NULL)) {
g_warning("We could not load the interface!");
return 0;
}
diff --git a/plugins/dfxvideo/Makefile.am b/plugins/dfxvideo/Makefile.am
index 3036da5f..520749b2 100755
--- a/plugins/dfxvideo/Makefile.am
+++ b/plugins/dfxvideo/Makefile.am
@@ -26,9 +26,32 @@ libDFXVideo_la_LDFLAGS = -module -avoid-version
libDFXVideo_la_LIBADD = -lX11 -lXv -lXext -lm
bin_PROGRAMS = cfgDFXVideo
-cfgDFXVideo_SOURCES = gpucfg-0.1df/main.c
+cfgDFXVideo_SOURCES = gpucfg-0.1df/main.c GtkResources.c GtkResources.h
cfgDFXVideo_LDADD = $(GTK3_LIBS) -lXext
-glade_DATA = gpucfg-0.1df/dfxvideo.ui
-gladedir = $(datadir)/psemu/
+# gresource.xml is dynamically generated in CMake. Mirror that here in a static way.
+define gresource_xml =
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+ <gresource prefix="/org/pcsxr/dfxvideo">
+ <file>dfxvideo.ui</file>
+ </gresource>
+</gresources>
+endef
+
+dfxvideo.gresource.xml:
+ $(file >$@,$(gresource_xml))
+dfxvideo_gresource: dfxvideo.gresource.xml
+ $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(srcdir)/gpucfg-0.1df --generate-dependencies $(srcdir)/$<)
+GtkResources.c: dfxvideo.gresource.xml $(dfxvideo_gresource)
+ $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir)/gpucfg-0.1df --generate-source --c-name dfxvideo $<
+GtkResources.h: dfxvideo.gresource.xml $(dfxvideo_gresource)
+ $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir)/gpucfg-0.1df --generate-header --c-name dfxvideo $<
+
+
+#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/dfxvideo/gpucfg-0.1df/dfxvideo.ui b/plugins/dfxvideo/gpucfg-0.1df/dfxvideo.ui
index 6acee0d6..54633d89 100755..100644
--- a/plugins/dfxvideo/gpucfg-0.1df/dfxvideo.ui
+++ b/plugins/dfxvideo/gpucfg-0.1df/dfxvideo.ui
@@ -1,6 +1,85 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.19.0 -->
<interface>
- <!-- interface-requires gtk+ 3.0 -->
+ <requires lib="gtk+" version="3.0"/>
+ <object class="GtkListStore" id="liststoreDither">
+ <columns>
+ <!-- column-name Item -->
+ <column type="gchararray"/>
+ </columns>
+ <data>
+ <row>
+ <col id="0" translatable="yes">0: Off (fastest)</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">1: Game dependant</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">2: Always</col>
+ </row>
+ </data>
+ </object>
+ <object class="GtkListStore" id="liststoreRes">
+ <columns>
+ <!-- column-name Item -->
+ <column type="gchararray"/>
+ </columns>
+ <data>
+ <row>
+ <col id="0" translatable="yes">320x240</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">640x480</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">800x600</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">1024x768</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">1152x864</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">1280x1024</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">1600x1200</col>
+ </row>
+ </data>
+ </object>
+ <object class="GtkListStore" id="liststoreStretching">
+ <columns>
+ <!-- column-name Item -->
+ <column type="gchararray"/>
+ </columns>
+ <data>
+ <row>
+ <col id="0" translatable="yes">0: None</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">1: 2xSai</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">2: 2xSuperSai</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">3: SuperEagle</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">4: Scale2x</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">5: Scale3x</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">6: HQ2X</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">7: HQ3X</col>
+ </row>
+ </data>
+ </object>
<object class="GtkWindow" id="CfgWnd">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -12,9 +91,10 @@
<property name="type_hint">dialog</property>
<signal name="destroy" handler="on_CfgWnd_destroy" swapped="no"/>
<child>
- <object class="GtkVBox" id="vbox1">
+ <object class="GtkBox" id="vbox1">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<object class="GtkFrame" id="frame1">
@@ -30,55 +110,50 @@
<property name="left_padding">5</property>
<property name="right_padding">5</property>
<child>
- <object class="GtkVBox" id="vbox7">
+ <object class="GtkBox" id="vbox7">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
<child>
- <object class="GtkTable" id="table1">
+ <object class="GtkGrid" id="table1">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="n_rows">3</property>
- <property name="n_columns">2</property>
- <property name="column_spacing">30</property>
<property name="row_spacing">6</property>
+ <property name="column_homogeneous">True</property>
<child>
<object class="GtkLabel" id="label14">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
<property name="label" translatable="yes">Initial Window Size:</property>
+ <property name="xalign">0</property>
</object>
<packing>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label15">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
<property name="label" translatable="yes">Stretching:</property>
+ <property name="xalign">0</property>
</object>
<packing>
+ <property name="left_attach">0</property>
<property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label16">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
<property name="label" translatable="yes">Dithering:</property>
+ <property name="xalign">0</property>
</object>
<packing>
+ <property name="left_attach">0</property>
<property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
</packing>
</child>
<child>
@@ -96,11 +171,7 @@
</object>
<packing>
<property name="left_attach">1</property>
- <property name="right_attach">2</property>
<property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
@@ -118,15 +189,11 @@
</object>
<packing>
<property name="left_attach">1</property>
- <property name="right_attach">2</property>
<property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
- <object class="GtkHBox" id="hbox2">
+ <object class="GtkBox" id="hbox2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">10</property>
@@ -170,7 +237,7 @@
</object>
<packing>
<property name="left_attach">1</property>
- <property name="right_attach">2</property>
+ <property name="top_attach">0</property>
</packing>
</child>
</object>
@@ -181,7 +248,7 @@
</packing>
</child>
<child>
- <object class="GtkHBox" id="hbox1">
+ <object class="GtkBox" id="hbox1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
@@ -232,9 +299,10 @@
<property name="left_padding">5</property>
<property name="right_padding">5</property>
<child>
- <object class="GtkVBox" id="vbox3">
+ <object class="GtkBox" id="vbox3">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
<child>
<object class="GtkCheckButton" id="checkShowFPS">
<property name="label" translatable="yes">Show FPS</property>
@@ -270,10 +338,9 @@
</packing>
</child>
<child>
- <object class="GtkTable" id="table2">
+ <object class="GtkGrid" id="table2">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="n_columns">3</property>
<property name="column_spacing">12</property>
<child>
<object class="GtkCheckButton" id="checkSetFPS">
@@ -287,8 +354,8 @@
<property name="draw_indicator">True</property>
</object>
<packing>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
</packing>
</child>
<child>
@@ -300,9 +367,7 @@
</object>
<packing>
<property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="x_options"></property>
- <property name="y_options"></property>
+ <property name="top_attach">0</property>
</packing>
</child>
<child>
@@ -319,7 +384,7 @@
</object>
<packing>
<property name="left_attach">2</property>
- <property name="right_attach">3</property>
+ <property name="top_attach">0</property>
</packing>
</child>
</object>
@@ -354,9 +419,10 @@
<property name="left_padding">5</property>
<property name="right_padding">5</property>
<child>
- <object class="GtkVBox" id="vbox4">
+ <object class="GtkBox" id="vbox4">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
<child>
<object class="GtkCheckButton" id="checkUseFixes">
<property name="label" translatable="yes">Use game fixes</property>
@@ -379,15 +445,11 @@
<property name="can_focus">False</property>
<property name="left_padding">19</property>
<child>
- <object class="GtkTable" id="table_fixes">
+ <object class="GtkGrid" id="table_fixes">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="n_rows">6</property>
- <property name="n_columns">2</property>
<property name="column_spacing">16</property>
- <child>
- <placeholder/>
- </child>
+ <property name="column_homogeneous">True</property>
<child>
<object class="GtkCheckButton" id="checkFix5">
<property name="label" translatable="yes">Disable CPU Saving</property>
@@ -400,10 +462,8 @@
<property name="draw_indicator">True</property>
</object>
<packing>
+ <property name="left_attach">0</property>
<property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
</packing>
</child>
<child>
@@ -418,8 +478,8 @@
<property name="draw_indicator">True</property>
</object>
<packing>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
</packing>
</child>
<child>
@@ -434,10 +494,8 @@
<property name="draw_indicator">True</property>
</object>
<packing>
+ <property name="left_attach">0</property>
<property name="top_attach">5</property>
- <property name="bottom_attach">6</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
</packing>
</child>
<child>
@@ -452,10 +510,8 @@
<property name="draw_indicator">True</property>
</object>
<packing>
+ <property name="left_attach">0</property>
<property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
</packing>
</child>
<child>
@@ -470,10 +526,8 @@
<property name="draw_indicator">True</property>
</object>
<packing>
+ <property name="left_attach">0</property>
<property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
</packing>
</child>
<child>
@@ -488,10 +542,8 @@
<property name="draw_indicator">True</property>
</object>
<packing>
+ <property name="left_attach">0</property>
<property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
</packing>
</child>
<child>
@@ -508,9 +560,7 @@
</object>
<packing>
<property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
+ <property name="top_attach">0</property>
</packing>
</child>
<child>
@@ -527,11 +577,7 @@
</object>
<packing>
<property name="left_attach">1</property>
- <property name="right_attach">2</property>
<property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
</packing>
</child>
<child>
@@ -548,11 +594,7 @@
</object>
<packing>
<property name="left_attach">1</property>
- <property name="right_attach">2</property>
<property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
</packing>
</child>
<child>
@@ -569,11 +611,7 @@
</object>
<packing>
<property name="left_attach">1</property>
- <property name="right_attach">2</property>
<property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
</packing>
</child>
<child>
@@ -590,11 +628,7 @@
</object>
<packing>
<property name="left_attach">1</property>
- <property name="right_attach">2</property>
<property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
</packing>
</child>
<child>
@@ -611,11 +645,7 @@
</object>
<packing>
<property name="left_attach">1</property>
- <property name="right_attach">2</property>
<property name="top_attach">5</property>
- <property name="bottom_attach">6</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
</packing>
</child>
</object>
@@ -639,7 +669,7 @@
</packing>
</child>
<child>
- <object class="GtkHButtonBox" id="hbuttonbox1">
+ <object class="GtkButtonBox" id="hbuttonbox1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">12</property>
@@ -669,82 +699,4 @@
</object>
</child>
</object>
- <object class="GtkListStore" id="liststoreDither">
- <columns>
- <!-- column-name Item -->
- <column type="gchararray"/>
- </columns>
- <data>
- <row>
- <col id="0" translatable="yes">0: Off (fastest)</col>
- </row>
- <row>
- <col id="0" translatable="yes">1: Game dependant</col>
- </row>
- <row>
- <col id="0" translatable="yes">2: Always</col>
- </row>
- </data>
- </object>
- <object class="GtkListStore" id="liststoreRes">
- <columns>
- <!-- column-name Item -->
- <column type="gchararray"/>
- </columns>
- <data>
- <row>
- <col id="0" translatable="yes">320x240</col>
- </row>
- <row>
- <col id="0" translatable="yes">640x480</col>
- </row>
- <row>
- <col id="0" translatable="yes">800x600</col>
- </row>
- <row>
- <col id="0" translatable="yes">1024x768</col>
- </row>
- <row>
- <col id="0" translatable="yes">1152x864</col>
- </row>
- <row>
- <col id="0" translatable="yes">1280x1024</col>
- </row>
- <row>
- <col id="0" translatable="yes">1600x1200</col>
- </row>
- </data>
- </object>
- <object class="GtkListStore" id="liststoreStretching">
- <columns>
- <!-- column-name Item -->
- <column type="gchararray"/>
- </columns>
- <data>
- <row>
- <col id="0" translatable="yes">0: None</col>
- </row>
- <row>
- <col id="0" translatable="yes">1: 2xSai</col>
- </row>
- <row>
- <col id="0" translatable="yes">2: 2xSuperSai</col>
- </row>
- <row>
- <col id="0" translatable="yes">3: SuperEagle</col>
- </row>
- <row>
- <col id="0" translatable="yes">4: Scale2x</col>
- </row>
- <row>
- <col id="0" translatable="yes">5: Scale3x</col>
- </row>
- <row>
- <col id="0" translatable="yes">6: HQ2X</col>
- </row>
- <row>
- <col id="0" translatable="yes">7: HQ3X</col>
- </row>
- </data>
- </object>
</interface>
diff --git a/plugins/dfxvideo/gpucfg-0.1df/main.c b/plugins/dfxvideo/gpucfg-0.1df/main.c
index 805495e6..ef44ed1c 100755
--- a/plugins/dfxvideo/gpucfg-0.1df/main.c
+++ b/plugins/dfxvideo/gpucfg-0.1df/main.c
@@ -135,6 +135,7 @@ main (int argc, char *argv[])
if (strcmp(argv[1], "about") == 0) {
const char *authors[]= {"Pete Bernert and the P.E.Op.S. team", "Ryan Schultz", "Andrew Burton", NULL};
widget = gtk_about_dialog_new ();
+ gtk_about_dialog_set_logo_icon_name (GTK_ABOUT_DIALOG(widget), "help-about");
gtk_about_dialog_set_program_name (GTK_ABOUT_DIALOG (widget), "P.E.Op.S PCSXR Video Plugin");
gtk_about_dialog_set_version (GTK_ABOUT_DIALOG (widget), "1.17");
gtk_about_dialog_set_authors (GTK_ABOUT_DIALOG (widget), authors);
@@ -151,7 +152,7 @@ main (int argc, char *argv[])
else {
builder = gtk_builder_new();
- if (!gtk_builder_add_from_file(builder, DATADIR "dfxvideo.ui", NULL)) {
+ if (!gtk_builder_add_from_resource(builder, "/org/pcsxr/dfxvideo/dfxvideo.ui", NULL)) {
g_warning("We could not load the interface!");
return -1;
}
diff --git a/plugins/nullsio1/Makefile.am b/plugins/nullsio1/Makefile.am
new file mode 100644
index 00000000..9d78b632
--- /dev/null
+++ b/plugins/nullsio1/Makefile.am
@@ -0,0 +1,10 @@
+bindir = @libdir@/games/psemu/
+libdir = @libdir@/games/psemu/
+
+lib_LTLIBRARIES = libNullSio1.la
+
+libNullSio1_la_SOURCES = sio1.c typedefs.h
+libNullSio1_la_LDFLAGS = -module -avoid-version
+
+AM_CPPFLAGS = -DDATADIR=\"${datadir}/psemu/\" \
+ -I$(top_srcdir)/libpcsxcore -I../../include
diff --git a/plugins/nullsio1/sio1.c b/plugins/nullsio1/sio1.c
new file mode 100644
index 00000000..44311f4b
--- /dev/null
+++ b/plugins/nullsio1/sio1.c
@@ -0,0 +1,289 @@
+/***************************************************************************
+ * Copyright (C) 2013 by Blade_Arma <edgbla@yandex.ru> *
+ * *
+ * 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 *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * 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. *
+ ***************************************************************************/
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdint.h>
+
+#include "typedefs.h"
+#include "psemu_plugin_defs.h"
+
+#ifndef CALLBACK
+#define CALLBACK
+#endif
+
+/***************************************************************************/
+
+static char *pluginName = "sio1Null";
+
+static const unsigned char version = 1;
+static const unsigned char revision = 1;
+static const unsigned char build = 1;
+
+static void (CALLBACK *irqCallback)() = 0;
+
+/* sio status flags.
+ */
+enum {
+ SR_TXRDY = 0x0001,
+ SR_RXRDY = 0x0002,
+ SR_TXU = 0x0004,
+ SR_PERROR = 0x0008,
+ SR_OE = 0x0010,
+ SR_FE = 0x0020,
+ SR_0040 = 0x0040, // ?
+ SR_DSR = 0x0080,
+ SR_CTS = 0x0100,
+ SR_IRQ = 0x0200
+};
+
+/* sio mode flags.
+ */
+enum {
+ MR_BR_1 = 0x0001,
+ MR_BR_16 = 0x0002,
+ MR_BR_64 = 0x0003,
+ MR_CHLEN_5 = 0x0000,
+ MR_CHLEN_6 = 0x0004,
+ MR_CHLEN_7 = 0x0008,
+ MR_CHLEN_8 = 0x000C,
+ MR_PEN = 0x0010,
+ MR_P_EVEN = 0x0020,
+ MR_SB_00 = 0x0000,
+ MR_SB_01 = 0x0040,
+ MR_SB_10 = 0x0080,
+ MR_SB_11 = 0x00C0
+};
+
+/* sio control flags.
+ */
+enum {
+ CR_TXEN = 0x0001,
+ CR_DTR = 0x0002,
+ CR_RXEN = 0x0004,
+ CR_0008 = 0x0008, // ?
+ CR_ERRRST = 0x0010,
+ CR_RTS = 0x0020,
+ CR_RST = 0x0040,
+ CR_0080 = 0x0080, // HM?
+ CR_BUFSZ_1 = 0x0000,
+ CR_BUFSZ_2 = 0x0100,
+ CR_BUFSZ_4 = 0x0200,
+ CR_BUFSZ_8 = 0x0300,
+ CR_TXIEN = 0x0400,
+ CR_RXIEN = 0x0800,
+ CR_DSRIEN = 0x1000,
+ CR_2000 = 0x2000 // CTSIEN?
+};
+
+static u16 statReg; // 0x1f801054: 0x185 SR_TXRDY | SR_TXU | SR_DSR | SR_CTS
+static u16 modeReg; // 0x1f801058: 0x0
+static u16 ctrlReg; // 0x1f80105A: 0x0
+static u16 baudReg; // 0x1f80105E: 0x0
+
+/***************************************************************************/
+
+long CALLBACK SIO1init() {
+ return 0;
+}
+
+long CALLBACK SIO1shutdown() {
+ return 0;
+}
+
+/***************************************************************************/
+
+long CALLBACK SIO1open(unsigned long *gpuDisp) {
+ statReg = SR_TXRDY | SR_TXU | SR_DSR | SR_CTS;
+ modeReg = 0x0000;
+ ctrlReg = 0x0000;
+ baudReg = 0x0000;
+ return 0;
+}
+
+long CALLBACK SIO1close() {
+ return 0;
+}
+
+/***************************************************************************/
+
+void CALLBACK SIO1pause() {
+}
+
+void CALLBACK SIO1resume() {
+}
+
+/***************************************************************************/
+
+long CALLBACK SIO1keypressed(int key) {
+ return 0;
+}
+
+/***************************************************************************/
+
+/* Write.
+ */
+
+void CALLBACK SIO1writeData8(u8 data) {
+}
+
+void CALLBACK SIO1writeData16(u16 data) {
+}
+
+void CALLBACK SIO1writeData32(u32 data) {
+}
+
+void CALLBACK SIO1writeStat16(u16 stat) {
+}
+
+void CALLBACK SIO1writeStat32(u32 stat) {
+ SIO1writeStat16(stat);
+}
+
+void CALLBACK SIO1writeMode16(u16 mode) {
+ modeReg = mode;
+}
+
+void CALLBACK SIO1writeMode32(u32 mode) {
+ SIO1writeMode16(mode);
+}
+
+void CALLBACK SIO1writeCtrl16(u16 ctrl) {
+ u16 ctrlSaved = ctrlReg;
+
+ ctrlReg = ctrl;
+
+ if(ctrlReg & CR_ERRRST) {
+ ctrlReg &= ~CR_ERRRST;
+ statReg &= ~(SR_PERROR | SR_OE | SR_FE | SR_IRQ);
+ }
+
+ if(ctrlReg & CR_RST) {
+ statReg &= ~SR_IRQ;
+ statReg |= SR_TXRDY | SR_TXU;
+ modeReg = 0;
+ ctrlReg = 0;
+ baudReg = 0;
+ }
+
+ if(ctrlReg & CR_TXIEN) {
+ if(!(statReg & SR_IRQ)) {
+ irqCallback();
+ statReg |= SR_IRQ;
+ }
+ }
+}
+
+void CALLBACK SIO1writeCtrl32(u32 ctrl) {
+ SIO1writeCtrl16(ctrl);
+}
+
+void CALLBACK SIO1writeBaud16(u16 baud) {
+ baudReg = baud;
+}
+
+void CALLBACK SIO1writeBaud32(u32 baud) {
+ SIO1writeBaud16(baud);
+}
+
+/* Read.
+ */
+
+u8 CALLBACK SIO1readData8() {
+ u8 data[1] = {0};
+ return *(u8*)data;
+}
+
+u16 CALLBACK SIO1readData16() {
+ u8 data[2] = {0, 0};
+ return *(u16*)data;
+}
+
+u32 CALLBACK SIO1readData32() {
+ u8 data[4] = {0, 0, 0, 0};
+ return *(u32*)data;
+}
+
+u16 CALLBACK SIO1readStat16() {
+ return statReg;
+}
+
+u32 CALLBACK SIO1readStat32() {
+ return statReg;
+}
+
+u16 CALLBACK SIO1readMode16() {
+ return modeReg;
+}
+
+u32 CALLBACK SIO1readMode32() {
+ return modeReg;
+}
+
+u16 CALLBACK SIO1readCtrl16() {
+ return ctrlReg;
+}
+
+u32 CALLBACK SIO1readCtrl32() {
+ return ctrlReg;
+}
+
+u16 CALLBACK SIO1readBaud16() {
+ return baudReg;
+}
+
+u32 CALLBACK SIO1readBaud32() {
+ return baudReg;
+}
+
+/***************************************************************************/
+
+void CALLBACK SIO1update(uint32_t t) {
+}
+
+void CALLBACK SIO1registerCallback(void (CALLBACK *callback)()) {
+ irqCallback = callback;
+}
+
+/***************************************************************************/
+
+unsigned long CALLBACK PSEgetLibType() {
+ return PSE_LT_SIO1;
+}
+
+char* CALLBACK PSEgetLibName() {
+ return pluginName;
+}
+
+unsigned long CALLBACK PSEgetLibVersion() {
+ return version << 16 | revision << 8 | build;
+}
+
+long CALLBACK SIO1test() {
+ return 0;
+}
+
+void CALLBACK SIO1about() {
+}
+
+void CALLBACK SIO1configure() {
+}
+
+/***************************************************************************/
diff --git a/plugins/nullsio1/typedefs.h b/plugins/nullsio1/typedefs.h
new file mode 100644
index 00000000..452d2b3a
--- /dev/null
+++ b/plugins/nullsio1/typedefs.h
@@ -0,0 +1,35 @@
+/***************************************************************************
+ * Copyright (C) 2013 by Blade_Arma <edgbla@yandex.ru> *
+ * *
+ * 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 *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * 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. *
+ ***************************************************************************/
+
+#ifndef _TYPEDEFS_H_
+#define _TYPEDEFS_H_
+
+typedef int8_t s8;
+typedef int16_t s16;
+typedef int32_t s32;
+typedef int64_t s64;
+typedef intptr_t sptr;
+
+typedef uint8_t u8;
+typedef uint16_t u16;
+typedef uint32_t u32;
+typedef uint64_t u64;
+typedef uintptr_t uptr;
+
+#endif // _TYPEDEFS_H_
diff --git a/plugins/peopsxgl/Makefile.am b/plugins/peopsxgl/Makefile.am
index 3c8f7250..576e140d 100755
--- a/plugins/peopsxgl/Makefile.am
+++ b/plugins/peopsxgl/Makefile.am
@@ -9,16 +9,49 @@ libdir = @libdir@/games/psemu/
lib_LTLIBRARIES = libpeopsxgl.la
-libpeopsxgl_la_SOURCES = cfg.c cfg.h draw.c draw.h fps.c fps.h gl_ext.h \
- gpu.c gpu.h key.c key.h menu.c menu.h prim.c prim.h soft.c soft.h \
- texture.c texture.h gte_accuracy.c gte_accuracy.h
+libpeopsxgl_la_SOURCES = \
+ cfg.c cfg.h \
+ draw.c draw.h \
+ fps.c fps.h \
+ gl_ext.h \
+ gpu.c gpu.h \
+ key.c key.h \
+ menu.c menu.h \
+ prim.c prim.h \
+ soft.c soft.h \
+ texture.c texture.h \
+ gte_accuracy.c gte_accuracy.h \
+ pgxp_gpu.c pgxp_gpu.h
libpeopsxgl_la_LDFLAGS = -module -avoid-version
libpeopsxgl_la_LIBADD = -lX11 -lXxf86vm -lGL -lm
bin_PROGRAMS = cfgpeopsxgl
-cfgpeopsxgl_SOURCES = gpucfg/main.c
+cfgpeopsxgl_SOURCES = gpucfg/main.c GtkResources.c GtkResources.h
cfgpeopsxgl_LDADD = $(GTK3_LIBS)
-glade_DATA = gpucfg/peopsxgl.ui
-gladedir = $(datadir)/psemu/
+# gresource.xml is dynamically generated in CMake. Mirror that here in a static way.
+define gresource_xml =
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+ <gresource prefix="/org/pcsxr/peopsxgl">
+ <file>peopsxgl.ui</file>
+ </gresource>
+</gresources>
+endef
+
+peopsxgl.gresource.xml:
+ $(file >$@,$(gresource_xml))
+peopsxgl_gresource: peopsxgl.gresource.xml
+ $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(srcdir)/gpucfg --generate-dependencies $(srcdir)/$<)
+GtkResources.c: peopsxgl.gresource.xml $(peopsxgl_gresource)
+ $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir)/gpucfg --generate-source --c-name peopsxgl $<
+GtkResources.h: peopsxgl.gresource.xml $(peopsxgl_gresource)
+ $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir)/gpucfg --generate-header --c-name peopsxgl $<
+
+
+#glade_DATA = gpucfg/peopsxgl.ui
+#gladedir = $(datadir)/psemu/
EXTRA_DIST = $(glade_DATA)
+
+CLEANFILES = peopsxgl.gresource.xml GtkResources.c GtkResources.h
+
diff --git a/plugins/peopsxgl/gpu.c b/plugins/peopsxgl/gpu.c
index 99ef36ba..c19dd2b6 100755
--- a/plugins/peopsxgl/gpu.c
+++ b/plugins/peopsxgl/gpu.c
@@ -48,7 +48,7 @@ static int iOldMode=0;
#include "fps.h"
#include "key.h"
#include "gte_accuracy.h"
-#include "PGXP_gpu.h"
+#include "pgxp_gpu.h"
#ifdef _WINDOWS
#include "resource.h"
#include "ssave.h"
diff --git a/plugins/peopsxgl/gpucfg/main.c b/plugins/peopsxgl/gpucfg/main.c
index 812ec5f9..b29c85fb 100755
--- a/plugins/peopsxgl/gpucfg/main.c
+++ b/plugins/peopsxgl/gpucfg/main.c
@@ -257,7 +257,7 @@ int main( int argc, char **argv ) {
builder = gtk_builder_new();
// Load the glade file
- if ( !gtk_builder_add_from_file( builder, DATADIR "peopsxgl.ui", &error ) ) {
+ if ( !gtk_builder_add_from_resource( builder, "/org/pcsxr/peopsxgl/peopsxgl.ui", &error ) ) {
g_warning( "%s", error->message );
g_free( error );
return( 1 );
@@ -269,6 +269,7 @@ int main( int argc, char **argv ) {
const char *authors[]= {"Adapted from P.E.Op.S OpenGL GPU by Pete Bernert", NULL};
widget = gtk_about_dialog_new();
+ gtk_about_dialog_set_logo_icon_name (GTK_ABOUT_DIALOG(widget), "help-about");
gtk_about_dialog_set_program_name(GTK_ABOUT_DIALOG(widget), "OpenGL GPU Driver");
gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(widget), "1.18");
gtk_about_dialog_set_authors(GTK_ABOUT_DIALOG(widget), authors);
diff --git a/plugins/peopsxgl/gpucfg/peopsxgl.ui b/plugins/peopsxgl/gpucfg/peopsxgl.ui
index 895c8d45..c53a9852 100755..100644
--- a/plugins/peopsxgl/gpucfg/peopsxgl.ui
+++ b/plugins/peopsxgl/gpucfg/peopsxgl.ui
@@ -1,6 +1,170 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.19.0 -->
<interface>
- <!-- interface-requires gtk+ 3.0 -->
+ <requires lib="gtk+" version="3.0"/>
+ <object class="GtkAdjustment" id="f">
+ <property name="lower">20</property>
+ <property name="upper">200</property>
+ <property name="value">60</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">10</property>
+ </object>
+ <object class="GtkListStore" id="liststore1">
+ <columns>
+ <!-- column-name item -->
+ <column type="gchararray"/>
+ </columns>
+ <data>
+ <row>
+ <col id="0" translatable="yes">Emulated VRam - Ok most times</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Gfx card buffer reads</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Gfx card buffer moves</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Gfx card buffer reads and moves</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Full Software (FVP)</col>
+ </row>
+ </data>
+ </object>
+ <object class="GtkListStore" id="liststore2">
+ <columns>
+ <!-- column-name item -->
+ <column type="gchararray"/>
+ </columns>
+ <data>
+ <row>
+ <col id="0" translatable="yes">Emulated VRam - Needs FVP</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Black - Fast, no effects</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Gfx card buffer - Can be slow</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Gfx card and soft - Slow</col>
+ </row>
+ </data>
+ </object>
+ <object class="GtkListStore" id="liststore3">
+ <columns>
+ <!-- column-name item -->
+ <column type="gchararray"/>
+ </columns>
+ <data>
+ <row>
+ <col id="0" translatable="yes">None - Fastest, most glitches</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Minimum - Missing screens</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Standard - OK for most games</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Enhanced - Shows more stuff</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Extended - Causing garbage</col>
+ </row>
+ </data>
+ </object>
+ <object class="GtkListStore" id="liststore4">
+ <columns>
+ <!-- column-name item -->
+ <column type="gchararray"/>
+ </columns>
+ <data>
+ <row>
+ <col id="0" translatable="yes">None (Standard)</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">2xSaI (Much vram needed)</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Scaled (Needs tex filtering)</col>
+ </row>
+ </data>
+ </object>
+ <object class="GtkListStore" id="liststore5">
+ <columns>
+ <!-- column-name item -->
+ <column type="gchararray"/>
+ </columns>
+ <data>
+ <row>
+ <col id="0" translatable="yes">None</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Standard - Glitches will happen</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Extended - No black borders</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Standard without sprites - Unfiltered 2D</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Extended without sprites - Unfiltered 2D</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Standard + smoothed sprites</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Extended + smoothed sprites</col>
+ </row>
+ </data>
+ </object>
+ <object class="GtkListStore" id="liststore6">
+ <columns>
+ <!-- column-name item -->
+ <column type="gchararray"/>
+ </columns>
+ <data>
+ <row>
+ <col id="0" translatable="yes">Don't care - Use driver's default textures</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">4444 - Fast, but less colorful</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">5551 - Nice colors, bad transparency</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">8888 - Best colors, more ram needed</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">BGR8888 - Faster on some cards</col>
+ </row>
+ </data>
+ </object>
+ <object class="GtkAdjustment" id="s">
+ <property name="lower">-1</property>
+ <property name="upper">255</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">10</property>
+ </object>
+ <object class="GtkAdjustment" id="v">
+ <property name="upper">1024</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">10</property>
+ </object>
+ <object class="GtkAdjustment" id="x">
+ <property name="upper">9999</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">10</property>
+ </object>
+ <object class="GtkAdjustment" id="y">
+ <property name="upper">9999</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">10</property>
+ </object>
<object class="GtkDialog" id="MainDialog">
<property name="can_focus">False</property>
<property name="border_width">5</property>
@@ -14,24 +178,94 @@
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">2</property>
+ <child internal-child="action_area">
+ <object class="GtkButtonBox" id="dialog-action_area3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="layout_style">end</property>
+ <child>
+ <object class="GtkButton" id="btnFast">
+ <property name="label" translatable="yes">Fast</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="tooltip_text" translatable="yes">Autoconfigure for fast display</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ <property name="secondary">True</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="btnBeautiful">
+ <property name="label" translatable="yes">Beautiful</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="tooltip_text" translatable="yes">Auto configure for beautiful display</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ <property name="secondary">True</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="btnSave">
+ <property name="label">gtk-ok</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">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="btnCancel">
+ <property name="label">gtk-cancel</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">3</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">end</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
<child>
<object class="GtkNotebook" id="notebook1">
<property name="visible">True</property>
<property name="can_focus">True</property>
<child>
- <object class="GtkVBox" id="vbox2">
+ <object class="GtkBox" id="vbox2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">10</property>
+ <property name="orientation">vertical</property>
<property name="spacing">5</property>
<child>
- <object class="GtkTable" id="table2">
+ <object class="GtkGrid" id="table2">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="n_rows">2</property>
- <property name="n_columns">2</property>
- <property name="column_spacing">5</property>
<property name="row_spacing">5</property>
+ <property name="column_spacing">5</property>
<child>
<object class="GtkSpinButton" id="spinXSize">
<property name="visible">True</property>
@@ -42,9 +276,7 @@
</object>
<packing>
<property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="x_options"></property>
- <property name="y_options"></property>
+ <property name="top_attach">0</property>
</packing>
</child>
<child>
@@ -57,37 +289,31 @@
</object>
<packing>
<property name="left_attach">1</property>
- <property name="right_attach">2</property>
<property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options"></property>
- <property name="y_options"></property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label7">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
<property name="label" translatable="yes">Width:</property>
+ <property name="xalign">0</property>
</object>
<packing>
- <property name="x_options"></property>
- <property name="y_options"></property>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label8">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
<property name="label" translatable="yes">Height:</property>
+ <property name="xalign">0</property>
</object>
<packing>
+ <property name="left_attach">0</property>
<property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options"></property>
- <property name="y_options"></property>
</packing>
</child>
</object>
@@ -170,49 +396,53 @@
</packing>
</child>
<child>
- <object class="GtkVBox" id="vbox6">
+ <object class="GtkBox" id="vbox6">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">10</property>
+ <property name="orientation">vertical</property>
<property name="spacing">5</property>
<child>
- <object class="GtkTable" id="table3">
+ <object class="GtkGrid" id="table3">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="n_rows">3</property>
- <property name="n_columns">2</property>
- <property name="column_spacing">5</property>
<property name="row_spacing">5</property>
+ <property name="column_spacing">5</property>
+ <property name="column_homogeneous">True</property>
<child>
<object class="GtkLabel" id="label9">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
<property name="label" translatable="yes">Quality:</property>
+ <property name="xalign">0</property>
</object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ </packing>
</child>
<child>
<object class="GtkLabel" id="label10">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
<property name="label" translatable="yes">Filtering:</property>
+ <property name="xalign">0</property>
</object>
<packing>
+ <property name="left_attach">0</property>
<property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label11">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
<property name="label" translatable="yes">HiRes Tex:</property>
+ <property name="xalign">0</property>
</object>
<packing>
+ <property name="left_attach">0</property>
<property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
</packing>
</child>
<child>
@@ -229,7 +459,7 @@
</object>
<packing>
<property name="left_attach">1</property>
- <property name="right_attach">2</property>
+ <property name="top_attach">0</property>
</packing>
</child>
<child>
@@ -246,9 +476,7 @@
</object>
<packing>
<property name="left_attach">1</property>
- <property name="right_attach">2</property>
<property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
</packing>
</child>
<child>
@@ -265,9 +493,7 @@
</object>
<packing>
<property name="left_attach">1</property>
- <property name="right_attach">2</property>
<property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
</packing>
</child>
</object>
@@ -278,7 +504,7 @@
</packing>
</child>
<child>
- <object class="GtkHBox" id="hbox4">
+ <object class="GtkBox" id="hbox4">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">5</property>
@@ -286,8 +512,8 @@
<object class="GtkLabel" id="label12">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
<property name="label" translatable="yes">VRam size in MBytes (0..1024, 0=auto):</property>
+ <property name="xalign">0</property>
</object>
<packing>
<property name="expand">False</property>
@@ -333,10 +559,11 @@
</packing>
</child>
<child>
- <object class="GtkVBox" id="vbox3">
+ <object class="GtkBox" id="vbox3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">10</property>
+ <property name="orientation">vertical</property>
<property name="spacing">5</property>
<child>
<object class="GtkCheckButton" id="chkShowFPS">
@@ -374,9 +601,10 @@
<property name="can_focus">False</property>
<property name="left_padding">20</property>
<child>
- <object class="GtkVBox" id="vboxFPSLimit">
+ <object class="GtkBox" id="vboxFPSLimit">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
<property name="spacing">5</property>
<child>
<object class="GtkRadioButton" id="radFPSLimitAuto">
@@ -396,7 +624,7 @@
</packing>
</child>
<child>
- <object class="GtkHBox" id="hbox2">
+ <object class="GtkBox" id="hbox2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">5</property>
@@ -490,49 +718,53 @@
</packing>
</child>
<child>
- <object class="GtkVBox" id="vbox8">
+ <object class="GtkBox" id="vbox8">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">10</property>
+ <property name="orientation">vertical</property>
<property name="spacing">5</property>
<child>
- <object class="GtkTable" id="table4">
+ <object class="GtkGrid" id="table4">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="n_rows">3</property>
- <property name="n_columns">2</property>
- <property name="column_spacing">5</property>
<property name="row_spacing">5</property>
+ <property name="column_spacing">5</property>
+ <property name="column_homogeneous">True</property>
<child>
<object class="GtkLabel" id="label14">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
<property name="label" translatable="yes">Offscreen drawing:</property>
+ <property name="xalign">0</property>
</object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ </packing>
</child>
<child>
<object class="GtkLabel" id="label15">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
<property name="label" translatable="yes">Framebuffer textures:</property>
+ <property name="xalign">0</property>
</object>
<packing>
+ <property name="left_attach">0</property>
<property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label16">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
<property name="label" translatable="yes">Framebuffer access:</property>
+ <property name="xalign">0</property>
</object>
<packing>
+ <property name="left_attach">0</property>
<property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
</packing>
</child>
<child>
@@ -549,7 +781,7 @@
</object>
<packing>
<property name="left_attach">1</property>
- <property name="right_attach">2</property>
+ <property name="top_attach">0</property>
</packing>
</child>
<child>
@@ -566,9 +798,7 @@
</object>
<packing>
<property name="left_attach">1</property>
- <property name="right_attach">2</property>
<property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
</packing>
</child>
<child>
@@ -585,9 +815,7 @@
</object>
<packing>
<property name="left_attach">1</property>
- <property name="right_attach">2</property>
<property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
</packing>
</child>
</object>
@@ -659,13 +887,14 @@
</packing>
</child>
<child>
- <object class="GtkVBox" id="vbox5">
+ <object class="GtkBox" id="vbox5">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">10</property>
+ <property name="orientation">vertical</property>
<property name="spacing">5</property>
<child>
- <object class="GtkHBox" id="hbox3">
+ <object class="GtkBox" id="hbox3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">5</property>
@@ -826,10 +1055,11 @@
</packing>
</child>
<child>
- <object class="GtkVBox" id="vbox1">
+ <object class="GtkBox" id="vbox1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">10</property>
+ <property name="orientation">vertical</property>
<property name="spacing">5</property>
<child>
<object class="GtkCheckButton" id="chkUseGameFixes">
@@ -852,13 +1082,12 @@
<property name="can_focus">False</property>
<property name="left_padding">20</property>
<child>
- <object class="GtkTable" id="tblGameFixes">
+ <object class="GtkGrid" id="tblGameFixes">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="n_rows">9</property>
- <property name="n_columns">2</property>
- <property name="column_spacing">5</property>
<property name="row_spacing">5</property>
+ <property name="column_spacing">5</property>
+ <property name="column_homogeneous">True</property>
<child>
<object class="GtkCheckButton" id="chkCfgFix1">
<property name="label" translatable="yes">Battle cursor (FF7)</property>
@@ -869,7 +1098,8 @@
<property name="draw_indicator">True</property>
</object>
<packing>
- <property name="y_options"></property>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
</packing>
</child>
<child>
@@ -883,8 +1113,7 @@
</object>
<packing>
<property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="y_options"></property>
+ <property name="top_attach">0</property>
</packing>
</child>
<child>
@@ -897,9 +1126,8 @@
<property name="draw_indicator">True</property>
</object>
<packing>
+ <property name="left_attach">0</property>
<property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_options"></property>
</packing>
</child>
<child>
@@ -912,9 +1140,8 @@
<property name="draw_indicator">True</property>
</object>
<packing>
+ <property name="left_attach">0</property>
<property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="y_options"></property>
</packing>
</child>
<child>
@@ -927,9 +1154,8 @@
<property name="draw_indicator">True</property>
</object>
<packing>
+ <property name="left_attach">0</property>
<property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="y_options"></property>
</packing>
</child>
<child>
@@ -942,9 +1168,8 @@
<property name="draw_indicator">True</property>
</object>
<packing>
+ <property name="left_attach">0</property>
<property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
- <property name="y_options"></property>
</packing>
</child>
<child>
@@ -957,9 +1182,8 @@
<property name="draw_indicator">True</property>
</object>
<packing>
+ <property name="left_attach">0</property>
<property name="top_attach">5</property>
- <property name="bottom_attach">6</property>
- <property name="y_options"></property>
</packing>
</child>
<child>
@@ -972,9 +1196,8 @@
<property name="draw_indicator">True</property>
</object>
<packing>
+ <property name="left_attach">0</property>
<property name="top_attach">6</property>
- <property name="bottom_attach">7</property>
- <property name="y_options"></property>
</packing>
</child>
<child>
@@ -987,9 +1210,8 @@
<property name="draw_indicator">True</property>
</object>
<packing>
+ <property name="left_attach">0</property>
<property name="top_attach">7</property>
- <property name="bottom_attach">8</property>
- <property name="y_options"></property>
</packing>
</child>
<child>
@@ -1002,9 +1224,8 @@
<property name="draw_indicator">True</property>
</object>
<packing>
+ <property name="left_attach">0</property>
<property name="top_attach">8</property>
- <property name="bottom_attach">9</property>
- <property name="y_options"></property>
</packing>
</child>
<child>
@@ -1018,10 +1239,7 @@
</object>
<packing>
<property name="left_attach">1</property>
- <property name="right_attach">2</property>
<property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_options"></property>
</packing>
</child>
<child>
@@ -1035,10 +1253,7 @@
</object>
<packing>
<property name="left_attach">1</property>
- <property name="right_attach">2</property>
<property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="y_options"></property>
</packing>
</child>
<child>
@@ -1052,10 +1267,7 @@
</object>
<packing>
<property name="left_attach">1</property>
- <property name="right_attach">2</property>
<property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="y_options"></property>
</packing>
</child>
<child>
@@ -1069,10 +1281,7 @@
</object>
<packing>
<property name="left_attach">1</property>
- <property name="right_attach">2</property>
<property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
- <property name="y_options"></property>
</packing>
</child>
<child>
@@ -1086,10 +1295,7 @@
</object>
<packing>
<property name="left_attach">1</property>
- <property name="right_attach">2</property>
<property name="top_attach">5</property>
- <property name="bottom_attach">6</property>
- <property name="y_options"></property>
</packing>
</child>
<child>
@@ -1103,16 +1309,12 @@
</object>
<packing>
<property name="left_attach">1</property>
- <property name="right_attach">2</property>
<property name="top_attach">6</property>
- <property name="bottom_attach">7</property>
- <property name="y_options"></property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="chkCfgFix65536">
<property name="label" translatable="yes">Unused</property>
- <property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
@@ -1121,10 +1323,7 @@
</object>
<packing>
<property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">7</property>
- <property name="bottom_attach">8</property>
- <property name="y_options"></property>
+ <property name="top_attach">8</property>
</packing>
</child>
<child>
@@ -1138,10 +1337,7 @@
</object>
<packing>
<property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">8</property>
- <property name="bottom_attach">9</property>
- <property name="y_options"></property>
+ <property name="top_attach">7</property>
</packing>
</child>
</object>
@@ -1176,77 +1372,6 @@
<property name="position">0</property>
</packing>
</child>
- <child internal-child="action_area">
- <object class="GtkButtonBox" id="dialog-action_area3">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="layout_style">end</property>
- <child>
- <object class="GtkButton" id="btnFast">
- <property name="label" translatable="yes">Fast</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="tooltip_text" translatable="yes">Autoconfigure for fast display</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- <property name="secondary">True</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="btnBeautiful">
- <property name="label" translatable="yes">Beautiful</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="tooltip_text" translatable="yes">Auto configure for beautiful display</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- <property name="secondary">True</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="btnSave">
- <property name="label">gtk-ok</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">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="btnCancel">
- <property name="label">gtk-cancel</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">3</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="pack_type">end</property>
- <property name="position">0</property>
- </packing>
- </child>
</object>
</child>
<action-widgets>
@@ -1256,167 +1381,4 @@
<action-widget response="0">btnCancel</action-widget>
</action-widgets>
</object>
- <object class="GtkAdjustment" id="f">
- <property name="lower">20</property>
- <property name="upper">200</property>
- <property name="value">60</property>
- <property name="step_increment">1</property>
- <property name="page_increment">10</property>
- </object>
- <object class="GtkListStore" id="liststore1">
- <columns>
- <!-- column-name item -->
- <column type="gchararray"/>
- </columns>
- <data>
- <row>
- <col id="0" translatable="yes">Emulated VRam - Ok most times</col>
- </row>
- <row>
- <col id="0" translatable="yes">Gfx card buffer reads</col>
- </row>
- <row>
- <col id="0" translatable="yes">Gfx card buffer moves</col>
- </row>
- <row>
- <col id="0" translatable="yes">Gfx card buffer reads and moves</col>
- </row>
- <row>
- <col id="0" translatable="yes">Full Software (FVP)</col>
- </row>
- </data>
- </object>
- <object class="GtkListStore" id="liststore2">
- <columns>
- <!-- column-name item -->
- <column type="gchararray"/>
- </columns>
- <data>
- <row>
- <col id="0" translatable="yes">Emulated VRam - Needs FVP</col>
- </row>
- <row>
- <col id="0" translatable="yes">Black - Fast, no effects</col>
- </row>
- <row>
- <col id="0" translatable="yes">Gfx card buffer - Can be slow</col>
- </row>
- <row>
- <col id="0" translatable="yes">Gfx card and soft - Slow</col>
- </row>
- </data>
- </object>
- <object class="GtkListStore" id="liststore3">
- <columns>
- <!-- column-name item -->
- <column type="gchararray"/>
- </columns>
- <data>
- <row>
- <col id="0" translatable="yes">None - Fastest, most glitches</col>
- </row>
- <row>
- <col id="0" translatable="yes">Minimum - Missing screens</col>
- </row>
- <row>
- <col id="0" translatable="yes">Standard - OK for most games</col>
- </row>
- <row>
- <col id="0" translatable="yes">Enhanced - Shows more stuff</col>
- </row>
- <row>
- <col id="0" translatable="yes">Extended - Causing garbage</col>
- </row>
- </data>
- </object>
- <object class="GtkListStore" id="liststore4">
- <columns>
- <!-- column-name item -->
- <column type="gchararray"/>
- </columns>
- <data>
- <row>
- <col id="0" translatable="yes">None (Standard)</col>
- </row>
- <row>
- <col id="0" translatable="yes">2xSaI (Much vram needed)</col>
- </row>
- <row>
- <col id="0" translatable="yes">Scaled (Needs tex filtering)</col>
- </row>
- </data>
- </object>
- <object class="GtkListStore" id="liststore5">
- <columns>
- <!-- column-name item -->
- <column type="gchararray"/>
- </columns>
- <data>
- <row>
- <col id="0" translatable="yes">None</col>
- </row>
- <row>
- <col id="0" translatable="yes">Standard - Glitches will happen</col>
- </row>
- <row>
- <col id="0" translatable="yes">Extended - No black borders</col>
- </row>
- <row>
- <col id="0" translatable="yes">Standard without sprites - Unfiltered 2D</col>
- </row>
- <row>
- <col id="0" translatable="yes">Extended without sprites - Unfiltered 2D</col>
- </row>
- <row>
- <col id="0" translatable="yes">Standard + smoothed sprites</col>
- </row>
- <row>
- <col id="0" translatable="yes">Extended + smoothed sprites</col>
- </row>
- </data>
- </object>
- <object class="GtkListStore" id="liststore6">
- <columns>
- <!-- column-name item -->
- <column type="gchararray"/>
- </columns>
- <data>
- <row>
- <col id="0" translatable="yes">Don't care - Use driver's default textures</col>
- </row>
- <row>
- <col id="0" translatable="yes">4444 - Fast, but less colorful</col>
- </row>
- <row>
- <col id="0" translatable="yes">5551 - Nice colors, bad transparency</col>
- </row>
- <row>
- <col id="0" translatable="yes">8888 - Best colors, more ram needed</col>
- </row>
- <row>
- <col id="0" translatable="yes">BGR8888 - Faster on some cards</col>
- </row>
- </data>
- </object>
- <object class="GtkAdjustment" id="s">
- <property name="lower">-1</property>
- <property name="upper">255</property>
- <property name="step_increment">1</property>
- <property name="page_increment">10</property>
- </object>
- <object class="GtkAdjustment" id="v">
- <property name="upper">1024</property>
- <property name="step_increment">1</property>
- <property name="page_increment">10</property>
- </object>
- <object class="GtkAdjustment" id="x">
- <property name="upper">9999</property>
- <property name="step_increment">1</property>
- <property name="page_increment">10</property>
- </object>
- <object class="GtkAdjustment" id="y">
- <property name="upper">9999</property>
- <property name="step_increment">1</property>
- <property name="page_increment">10</property>
- </object>
</interface>
diff --git a/plugins/peopsxgl/prim.c b/plugins/peopsxgl/prim.c
index b2aad92b..1af588f0 100755
--- a/plugins/peopsxgl/prim.c
+++ b/plugins/peopsxgl/prim.c
@@ -25,7 +25,7 @@
#include "draw.h"
#include "soft.h"
#include "texture.h"
-#include "PGXP_gpu.h"
+#include "pgxp_gpu.h"
////////////////////////////////////////////////////////////////////////
// defines