From d880179b2a3aacae96bb4771a3c9e227ca6d5818 Mon Sep 17 00:00:00 2001 From: Stelios Tsampas Date: Mon, 10 Jul 2017 16:14:43 +0300 Subject: Fix compilation on linux. --- plugins/peopsxgl/Makefile.am | 16 +++++++++++++--- plugins/peopsxgl/gpu.c | 2 +- plugins/peopsxgl/prim.c | 2 +- 3 files changed, 15 insertions(+), 5 deletions(-) (limited to 'plugins') diff --git a/plugins/peopsxgl/Makefile.am b/plugins/peopsxgl/Makefile.am index 3c8f7250..9bcd6bea 100755 --- a/plugins/peopsxgl/Makefile.am +++ b/plugins/peopsxgl/Makefile.am @@ -9,9 +9,19 @@ 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 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/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 -- cgit v1.2.3 From a96eefdf0f10a9a051e65f6e88a24dc3abe40fc5 Mon Sep 17 00:00:00 2001 From: Stelios Tsampas Date: Mon, 17 Jul 2017 17:32:35 +0300 Subject: * Bring pluing Linux(gtk) interfaces up to date. --- plugins/bladesio1/Makefile.am | 26 +- plugins/bladesio1/gui.c | 3 +- plugins/dfcdrom/Makefile.am | 26 +- plugins/dfcdrom/cdrcfg-0.1df/dfcdrom.ui | 167 ++++---- plugins/dfcdrom/cdrcfg-0.1df/main.c | 7 +- plugins/dfinput/Makefile.am | 26 +- plugins/dfinput/cfg-gtk.c | 4 +- plugins/dfinput/dfinput.ui | 160 ++++---- plugins/dfnet/Makefile.am | 26 +- plugins/dfnet/dfnet.ui | 41 +- plugins/dfnet/gui.c | 3 +- plugins/dfsound/Makefile.am | 25 +- plugins/dfsound/spucfg-0.1df/dfsound.ui | 168 ++++---- plugins/dfsound/spucfg-0.1df/main.c | 3 +- plugins/dfxvideo/Makefile.am | 26 +- plugins/dfxvideo/gpucfg-0.1df/dfxvideo.ui | 280 ++++++------- plugins/dfxvideo/gpucfg-0.1df/main.c | 3 +- plugins/peopsxgl/Makefile.am | 26 +- plugins/peopsxgl/gpucfg/main.c | 3 +- plugins/peopsxgl/gpucfg/peopsxgl.ui | 646 ++++++++++++++---------------- 20 files changed, 855 insertions(+), 814 deletions(-) mode change 100755 => 100644 plugins/dfnet/dfnet.ui mode change 100755 => 100644 plugins/dfsound/spucfg-0.1df/dfsound.ui mode change 100755 => 100644 plugins/dfxvideo/gpucfg-0.1df/dfxvideo.ui mode change 100755 => 100644 plugins/peopsxgl/gpucfg/peopsxgl.ui (limited to 'plugins') diff --git a/plugins/bladesio1/Makefile.am b/plugins/bladesio1/Makefile.am index 9e0b6ab5..880aa647 100644 --- a/plugins/bladesio1/Makefile.am +++ b/plugins/bladesio1/Makefile.am @@ -12,9 +12,29 @@ 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 = + + + + sio1.ui + + +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) 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..4b3dec4b 100644 --- a/plugins/dfcdrom/Makefile.am +++ b/plugins/dfcdrom/Makefile.am @@ -27,9 +27,29 @@ 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 = + + + + dfcdrom.ui + + +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) 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 @@ + - + 32 2048 @@ -13,6 +14,76 @@ 1 4 + + + + + + + + Normal (No Cache) + + + Threaded - Faster (With Cache) + + + + + + + + + + + Default + + + 125ms + + + 250ms + + + 500ms + + + 1s + + + 2s + + + 4s + + + 8s + + + 16s + + + 32s + + + 1min + + + 2min + + + 4min + + + 8min + + + 16min + + + 32min + + + True False @@ -58,16 +129,17 @@ - + True False + vertical True False 0 - + True False 5 @@ -104,11 +176,12 @@ False 0 - + True False + vertical - + True False 5 @@ -117,8 +190,8 @@ True False - 0 Select read mode: + 0 False @@ -152,7 +225,7 @@ - + True False 5 @@ -161,8 +234,8 @@ True False - 0 Cache Size (Def. 64): + 0 False @@ -195,7 +268,7 @@ - + True False 5 @@ -204,8 +277,8 @@ True False - 0 Spindown Time: + 0 False @@ -240,7 +313,7 @@ - + True False 5 @@ -249,8 +322,8 @@ True False - 0 Cdrom Speed (Def. 0 = MAX): + 0 False @@ -321,74 +394,4 @@ cfg_closebutton - - - - - - - - Normal (No Cache) - - - Threaded - Faster (With Cache) - - - - - - - - - - - Default - - - 125ms - - - 250ms - - - 500ms - - - 1s - - - 2s - - - 4s - - - 8s - - - 16s - - - 32s - - - 1min - - - 2min - - - 4min - - - 8min - - - 16min - - - 32min - - - 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 ", 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..11eee3eb 100644 --- a/plugins/dfinput/Makefile.am +++ b/plugins/dfinput/Makefile.am @@ -13,9 +13,29 @@ 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 = + + + + dfinput.ui + + +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) diff --git a/plugins/dfinput/cfg-gtk.c b/plugins/dfinput/cfg-gtk.c index 5f26040f..61218cea 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); } } @@ -655,7 +654,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; } @@ -837,6 +836,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/dfinput.ui b/plugins/dfinput/dfinput.ui index 17dfbdb9..f189d8b3 100644 --- a/plugins/dfinput/dfinput.ui +++ b/plugins/dfinput/dfinput.ui @@ -1,23 +1,58 @@ + - + + + + + + + + + Digital Pad + + + Analog Pad + + + Mouse + + + + + + + + + + + Digital Pad + + + Analog Pad + + + Mouse + + + False - + True False 5 - 2 True True - + True False 5 + vertical 2 @@ -29,14 +64,12 @@ True False - 0 Device: + 0 0 0 - 1 - 1 @@ -47,22 +80,18 @@ 1 0 - 1 - 1 True False - 0 Type: + 0 0 1 - 1 - 1 @@ -80,8 +109,6 @@ 1 1 - 1 - 1 @@ -113,7 +140,6 @@ True True 5 - True etched-in @@ -132,7 +158,7 @@ - + True False 20 @@ -143,7 +169,7 @@ True True - + True False @@ -151,7 +177,7 @@ True False gtk-edit - 1 + 1 True @@ -186,7 +212,7 @@ True True - + True False @@ -194,7 +220,7 @@ True False gtk-undo - 1 + 1 True @@ -243,10 +269,11 @@ - + True False 5 + vertical 2 @@ -258,14 +285,12 @@ True False - 0 Device: + 0 0 0 - 1 - 1 @@ -276,22 +301,18 @@ 1 0 - 1 - 1 True False - 0 Type: + 0 0 1 - 1 - 1 @@ -309,8 +330,6 @@ 1 1 - 1 - 1 @@ -342,7 +361,6 @@ True True 5 - True etched-in @@ -361,7 +379,7 @@ - + True False 20 @@ -372,7 +390,7 @@ True True - + True False @@ -380,7 +398,7 @@ True False gtk-edit - 1 + 1 True @@ -415,7 +433,7 @@ True True - + True False @@ -423,7 +441,7 @@ True False gtk-undo - 1 + 1 True @@ -471,14 +489,16 @@ Controller 2 + 1 False - + True False 5 + vertical 2 @@ -490,14 +510,12 @@ True False - 0 Device: + 0 0 0 - 1 - 1 @@ -508,8 +526,6 @@ 1 0 - 1 - 1 @@ -526,7 +542,6 @@ True True 5 - True etched-in @@ -545,7 +560,7 @@ - + True False 20 @@ -556,7 +571,7 @@ True True - + True False @@ -564,7 +579,7 @@ True False gtk-edit - 1 + 1 True @@ -599,7 +614,7 @@ True True - + True False @@ -607,7 +622,7 @@ True False gtk-undo - 1 + 1 True @@ -655,14 +670,16 @@ Emulator keys + 2 False - + True False 5 + vertical 5 @@ -726,9 +743,13 @@ + + 0 + 0 + - + True False end @@ -748,46 +769,11 @@ + 0 1 - 2 - GTK_FILL - - - - - - - - Digital Pad - - - Analog Pad - - - Mouse - - - - - - - - - - - Digital Pad - - - Analog Pad - - - Mouse - - - diff --git a/plugins/dfnet/Makefile.am b/plugins/dfnet/Makefile.am index d639c652..4000b8c4 100755 --- a/plugins/dfnet/Makefile.am +++ b/plugins/dfnet/Makefile.am @@ -12,9 +12,29 @@ 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 = + + + + dfnet.ui + + +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) diff --git a/plugins/dfnet/dfnet.ui b/plugins/dfnet/dfnet.ui old mode 100755 new mode 100644 index bdad3a1d..7ab884c2 --- a/plugins/dfnet/dfnet.ui +++ b/plugins/dfnet/dfnet.ui @@ -1,6 +1,7 @@ + - + False 5 @@ -25,7 +26,7 @@ True True - + True False @@ -44,8 +45,8 @@ True False - 0 Start Game + 0 True @@ -68,7 +69,7 @@ True True - + True False @@ -87,8 +88,8 @@ True False - 0 Play Offline + 0 True @@ -114,9 +115,10 @@ - + True False + vertical 12 @@ -136,20 +138,18 @@ If you selected Client please enter the IP address the Server gave to you in the - + True False - 2 - 2 - 8 12 + 8 True True True - + True False @@ -168,8 +168,8 @@ If you selected Client please enter the IP address the Server gave to you in the True False - 0 Copy PC IP to Clipboard + 0 True @@ -182,7 +182,7 @@ If you selected Client please enter the IP address the Server gave to you in the 1 - 2 + 0 @@ -195,9 +195,7 @@ If you selected Client please enter the IP address the Server gave to you in the 1 - 2 1 - 2 @@ -210,6 +208,10 @@ If you selected Client please enter the IP address the Server gave to you in the True True + + 0 + 0 + @@ -223,8 +225,8 @@ If you selected Client please enter the IP address the Server gave to you in the rbServer + 0 1 - 2 @@ -236,9 +238,10 @@ If you selected Client please enter the IP address the Server gave to you in the - + True False + vertical 6 @@ -254,15 +257,15 @@ If you selected Client please enter the IP address the Server gave to you in the - + True False True False - 0 Port Number + 0 True 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..b34f3267 100755 --- a/plugins/dfsound/Makefile.am +++ b/plugins/dfsound/Makefile.am @@ -49,9 +49,28 @@ 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 = + + + + dfsound.ui + + +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) diff --git a/plugins/dfsound/spucfg-0.1df/dfsound.ui b/plugins/dfsound/spucfg-0.1df/dfsound.ui old mode 100755 new mode 100644 index 1c816a1d..9d897204 --- a/plugins/dfsound/spucfg-0.1df/dfsound.ui +++ b/plugins/dfsound/spucfg-0.1df/dfsound.ui @@ -1,6 +1,67 @@ + - + + + + + + + + + None + + + Simple + + + Gaussian + + + Cubic + + + + + + + + + + + Off + + + Simple + + + Playstation + + + + + + + + + + + None + + + Low + + + Medium + + + Loud + + + Loudest + + + False 5 @@ -42,9 +103,10 @@ - + True False + vertical 6 @@ -57,54 +119,49 @@ False 5 - + True False - 3 - 2 - 5 5 + 5 + True True False - 0 Volume: right + 0 - GTK_FILL - + 0 + 0 True False - 0 Interpolation: right + 0 + 0 2 - 3 - GTK_FILL - True False - 0 Reverb: right + 0 + 0 1 - 2 - GTK_FILL - @@ -121,8 +178,7 @@ 1 - 2 - GTK_FILL + 0 @@ -139,11 +195,7 @@ 1 - 2 1 - 2 - GTK_FILL - GTK_FILL @@ -160,11 +212,7 @@ 1 - 2 2 - 3 - GTK_FILL - GTK_FILL @@ -189,9 +237,10 @@ False 5 - + True False + vertical 6 @@ -234,9 +283,10 @@ False 5 - + True False + vertical 6 @@ -334,64 +384,4 @@ btn_close - - - - - - - - None - - - Simple - - - Gaussian - - - Cubic - - - - - - - - - - - Off - - - Simple - - - Playstation - - - - - - - - - - - None - - - Low - - - Medium - - - Loud - - - Loudest - - - 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..86e8ef3a 100755 --- a/plugins/dfxvideo/Makefile.am +++ b/plugins/dfxvideo/Makefile.am @@ -26,9 +26,29 @@ 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 = + + + + dfxvideo.ui + + +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) diff --git a/plugins/dfxvideo/gpucfg-0.1df/dfxvideo.ui b/plugins/dfxvideo/gpucfg-0.1df/dfxvideo.ui old mode 100755 new mode 100644 index 6acee0d6..54633d89 --- a/plugins/dfxvideo/gpucfg-0.1df/dfxvideo.ui +++ b/plugins/dfxvideo/gpucfg-0.1df/dfxvideo.ui @@ -1,6 +1,85 @@ + - + + + + + + + + + 0: Off (fastest) + + + 1: Game dependant + + + 2: Always + + + + + + + + + + + 320x240 + + + 640x480 + + + 800x600 + + + 1024x768 + + + 1152x864 + + + 1280x1024 + + + 1600x1200 + + + + + + + + + + + 0: None + + + 1: 2xSai + + + 2: 2xSuperSai + + + 3: SuperEagle + + + 4: Scale2x + + + 5: Scale3x + + + 6: HQ2X + + + 7: HQ3X + + + True False @@ -12,9 +91,10 @@ dialog - + True False + vertical 6 @@ -30,55 +110,50 @@ 5 5 - + True False + vertical - + True False - 3 - 2 - 30 6 + True True False - 0 Initial Window Size: + 0 - GTK_FILL - + 0 + 0 True False - 0 Stretching: + 0 + 0 1 - 2 - GTK_FILL - True False - 0 Dithering: + 0 + 0 2 - 3 - GTK_FILL - @@ -96,11 +171,7 @@ 1 - 2 1 - 2 - GTK_FILL - GTK_FILL @@ -118,15 +189,11 @@ 1 - 2 2 - 3 - GTK_FILL - GTK_FILL - + True False 10 @@ -170,7 +237,7 @@ 1 - 2 + 0 @@ -181,7 +248,7 @@ - + True False @@ -232,9 +299,10 @@ 5 5 - + True False + vertical Show FPS @@ -270,10 +338,9 @@ - + True False - 3 12 @@ -287,8 +354,8 @@ True - GTK_FILL - + 0 + 0 @@ -300,9 +367,7 @@ 1 - 2 - - + 0 @@ -319,7 +384,7 @@ 2 - 3 + 0 @@ -354,9 +419,10 @@ 5 5 - + True False + vertical Use game fixes @@ -379,15 +445,11 @@ False 19 - + True False - 6 - 2 16 - - - + True Disable CPU Saving @@ -400,10 +462,8 @@ True + 0 4 - 5 - GTK_FILL - @@ -418,8 +478,8 @@ True - GTK_FILL - + 0 + 0 @@ -434,10 +494,8 @@ True + 0 5 - 6 - GTK_FILL - @@ -452,10 +510,8 @@ True + 0 1 - 2 - GTK_FILL - @@ -470,10 +526,8 @@ True + 0 2 - 3 - GTK_FILL - @@ -488,10 +542,8 @@ True + 0 3 - 4 - GTK_FILL - @@ -508,9 +560,7 @@ 1 - 2 - GTK_FILL - + 0 @@ -527,11 +577,7 @@ 1 - 2 1 - 2 - GTK_FILL - @@ -548,11 +594,7 @@ 1 - 2 2 - 3 - GTK_FILL - @@ -569,11 +611,7 @@ 1 - 2 3 - 4 - GTK_FILL - @@ -590,11 +628,7 @@ 1 - 2 4 - 5 - GTK_FILL - @@ -611,11 +645,7 @@ 1 - 2 5 - 6 - GTK_FILL - @@ -639,7 +669,7 @@ - + True False 12 @@ -669,82 +699,4 @@ - - - - - - - - 0: Off (fastest) - - - 1: Game dependant - - - 2: Always - - - - - - - - - - - 320x240 - - - 640x480 - - - 800x600 - - - 1024x768 - - - 1152x864 - - - 1280x1024 - - - 1600x1200 - - - - - - - - - - - 0: None - - - 1: 2xSai - - - 2: 2xSuperSai - - - 3: SuperEagle - - - 4: Scale2x - - - 5: Scale3x - - - 6: HQ2X - - - 7: HQ3X - - - 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/peopsxgl/Makefile.am b/plugins/peopsxgl/Makefile.am index 9bcd6bea..a37643e6 100755 --- a/plugins/peopsxgl/Makefile.am +++ b/plugins/peopsxgl/Makefile.am @@ -26,9 +26,29 @@ 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 = + + + + peopsxgl.ui + + +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) 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 old mode 100755 new mode 100644 index 895c8d45..c53a9852 --- a/plugins/peopsxgl/gpucfg/peopsxgl.ui +++ b/plugins/peopsxgl/gpucfg/peopsxgl.ui @@ -1,6 +1,170 @@ + - + + + 20 + 200 + 60 + 1 + 10 + + + + + + + + + Emulated VRam - Ok most times + + + Gfx card buffer reads + + + Gfx card buffer moves + + + Gfx card buffer reads and moves + + + Full Software (FVP) + + + + + + + + + + + Emulated VRam - Needs FVP + + + Black - Fast, no effects + + + Gfx card buffer - Can be slow + + + Gfx card and soft - Slow + + + + + + + + + + + None - Fastest, most glitches + + + Minimum - Missing screens + + + Standard - OK for most games + + + Enhanced - Shows more stuff + + + Extended - Causing garbage + + + + + + + + + + + None (Standard) + + + 2xSaI (Much vram needed) + + + Scaled (Needs tex filtering) + + + + + + + + + + + None + + + Standard - Glitches will happen + + + Extended - No black borders + + + Standard without sprites - Unfiltered 2D + + + Extended without sprites - Unfiltered 2D + + + Standard + smoothed sprites + + + Extended + smoothed sprites + + + + + + + + + + + Don't care - Use driver's default textures + + + 4444 - Fast, but less colorful + + + 5551 - Nice colors, bad transparency + + + 8888 - Best colors, more ram needed + + + BGR8888 - Faster on some cards + + + + + -1 + 255 + 1 + 10 + + + 1024 + 1 + 10 + + + 9999 + 1 + 10 + + + 9999 + 1 + 10 + False 5 @@ -14,24 +178,94 @@ False vertical 2 + + + True + False + end + + + Fast + True + True + True + Autoconfigure for fast display + + + False + False + 0 + True + + + + + Beautiful + True + True + True + Auto configure for beautiful display + + + False + False + 1 + True + + + + + gtk-ok + True + True + True + True + + + False + False + 2 + + + + + gtk-cancel + True + True + True + True + + + False + False + 3 + + + + + False + True + end + 0 + + True True - + True False 10 + vertical 5 - + True False - 2 - 2 - 5 5 + 5 True @@ -42,9 +276,7 @@ 1 - 2 - - + 0 @@ -57,37 +289,31 @@ 1 - 2 1 - 2 - - True False - 0 Width: + 0 - - + 0 + 0 True False - 0 Height: + 0 + 0 1 - 2 - - @@ -170,49 +396,53 @@ - + True False 10 + vertical 5 - + True False - 3 - 2 - 5 5 + 5 + True True False - 0 Quality: + 0 + + 0 + 0 + True False - 0 Filtering: + 0 + 0 1 - 2 True False - 0 HiRes Tex: + 0 + 0 2 - 3 @@ -229,7 +459,7 @@ 1 - 2 + 0 @@ -246,9 +476,7 @@ 1 - 2 1 - 2 @@ -265,9 +493,7 @@ 1 - 2 2 - 3 @@ -278,7 +504,7 @@ - + True False 5 @@ -286,8 +512,8 @@ True False - 0 VRam size in MBytes (0..1024, 0=auto): + 0 False @@ -333,10 +559,11 @@ - + True False 10 + vertical 5 @@ -374,9 +601,10 @@ False 20 - + True False + vertical 5 @@ -396,7 +624,7 @@ - + True False 5 @@ -490,49 +718,53 @@ - + True False 10 + vertical 5 - + True False - 3 - 2 - 5 5 + 5 + True True False - 0 Offscreen drawing: + 0 + + 0 + 0 + True False - 0 Framebuffer textures: + 0 + 0 1 - 2 True False - 0 Framebuffer access: + 0 + 0 2 - 3 @@ -549,7 +781,7 @@ 1 - 2 + 0 @@ -566,9 +798,7 @@ 1 - 2 1 - 2 @@ -585,9 +815,7 @@ 1 - 2 2 - 3 @@ -659,13 +887,14 @@ - + True False 10 + vertical 5 - + True False 5 @@ -826,10 +1055,11 @@ - + True False 10 + vertical 5 @@ -852,13 +1082,12 @@ False 20 - + True False - 9 - 2 - 5 5 + 5 + True Battle cursor (FF7) @@ -869,7 +1098,8 @@ True - + 0 + 0 @@ -883,8 +1113,7 @@ 1 - 2 - + 0 @@ -897,9 +1126,8 @@ True + 0 1 - 2 - @@ -912,9 +1140,8 @@ True + 0 2 - 3 - @@ -927,9 +1154,8 @@ True + 0 3 - 4 - @@ -942,9 +1168,8 @@ True + 0 4 - 5 - @@ -957,9 +1182,8 @@ True + 0 5 - 6 - @@ -972,9 +1196,8 @@ True + 0 6 - 7 - @@ -987,9 +1210,8 @@ True + 0 7 - 8 - @@ -1002,9 +1224,8 @@ True + 0 8 - 9 - @@ -1018,10 +1239,7 @@ 1 - 2 1 - 2 - @@ -1035,10 +1253,7 @@ 1 - 2 2 - 3 - @@ -1052,10 +1267,7 @@ 1 - 2 3 - 4 - @@ -1069,10 +1281,7 @@ 1 - 2 4 - 5 - @@ -1086,10 +1295,7 @@ 1 - 2 5 - 6 - @@ -1103,16 +1309,12 @@ 1 - 2 6 - 7 - Unused - True False True False @@ -1121,10 +1323,7 @@ 1 - 2 - 7 - 8 - + 8 @@ -1138,10 +1337,7 @@ 1 - 2 - 8 - 9 - + 7 @@ -1176,77 +1372,6 @@ 0 - - - True - False - end - - - Fast - True - True - True - Autoconfigure for fast display - - - False - False - 0 - True - - - - - Beautiful - True - True - True - Auto configure for beautiful display - - - False - False - 1 - True - - - - - gtk-ok - True - True - True - True - - - False - False - 2 - - - - - gtk-cancel - True - True - True - True - - - False - False - 3 - - - - - False - True - end - 0 - - @@ -1256,167 +1381,4 @@ btnCancel - - 20 - 200 - 60 - 1 - 10 - - - - - - - - - Emulated VRam - Ok most times - - - Gfx card buffer reads - - - Gfx card buffer moves - - - Gfx card buffer reads and moves - - - Full Software (FVP) - - - - - - - - - - - Emulated VRam - Needs FVP - - - Black - Fast, no effects - - - Gfx card buffer - Can be slow - - - Gfx card and soft - Slow - - - - - - - - - - - None - Fastest, most glitches - - - Minimum - Missing screens - - - Standard - OK for most games - - - Enhanced - Shows more stuff - - - Extended - Causing garbage - - - - - - - - - - - None (Standard) - - - 2xSaI (Much vram needed) - - - Scaled (Needs tex filtering) - - - - - - - - - - - None - - - Standard - Glitches will happen - - - Extended - No black borders - - - Standard without sprites - Unfiltered 2D - - - Extended without sprites - Unfiltered 2D - - - Standard + smoothed sprites - - - Extended + smoothed sprites - - - - - - - - - - - Don't care - Use driver's default textures - - - 4444 - Fast, but less colorful - - - 5551 - Nice colors, bad transparency - - - 8888 - Best colors, more ram needed - - - BGR8888 - Faster on some cards - - - - - -1 - 255 - 1 - 10 - - - 1024 - 1 - 10 - - - 9999 - 1 - 10 - - - 9999 - 1 - 10 - -- cgit v1.2.3 From 7a43668f9d227213586a305d1913d3c4b5d98f5a Mon Sep 17 00:00:00 2001 From: Stelios Tsampas Date: Mon, 17 Jul 2017 18:08:59 +0300 Subject: * Add nullsio1 plugin from upstream --- Makefile.am | 1 + configure.ac | 1 + plugins/nullsio1/Makefile.am | 10 ++ plugins/nullsio1/sio1.c | 289 +++++++++++++++++++++++++++++++++++++++++++ plugins/nullsio1/typedefs.h | 35 ++++++ 5 files changed, 336 insertions(+) create mode 100644 plugins/nullsio1/Makefile.am create mode 100644 plugins/nullsio1/sio1.c create mode 100644 plugins/nullsio1/typedefs.h (limited to 'plugins') diff --git a/Makefile.am b/Makefile.am index a13437a9..82dc5c19 100644 --- a/Makefile.am +++ b/Makefile.am @@ -11,6 +11,7 @@ SUBDIRS += plugins/dfsound SUBDIRS += plugins/dfxvideo SUBDIRS += plugins/dfcdrom SUBDIRS += plugins/dfnet +SUBDIRS += plugins/nullsio1 SUBDIRS += $(BLADESIO1) SUBDIRS += $(PEOPSXGL) diff --git a/configure.ac b/configure.ac index 3eed1175..001bacbd 100644 --- a/configure.ac +++ b/configure.ac @@ -53,6 +53,7 @@ plugins/dfsound/Makefile plugins/dfxvideo/Makefile plugins/dfcdrom/Makefile plugins/dfnet/Makefile +plugins/nullsio1/Makefile plugins/peopsxgl/Makefile gui/data/pixmaps/Makefile po/Makefile.in]) 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 * + * * + * 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 +#include +#include +#include + +#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 * + * * + * 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_ -- cgit v1.2.3 From f48b5b2ac35ee69db0c0ffd3f411ffc21b7d5789 Mon Sep 17 00:00:00 2001 From: Stelios Tsampas Date: Mon, 17 Jul 2017 23:22:35 +0300 Subject: * Add configuration UI for PGXP. * Clean generated files with `make clean` --- gui/ConfDlg.c | 83 ++++++++++++ gui/Makefile.am | 2 + gui/data/pcsxr.ui | 294 +++++++++++++++++++++++++++++++++++++++++- plugins/bladesio1/Makefile.am | 3 + plugins/dfcdrom/Makefile.am | 3 + plugins/dfinput/Makefile.am | 2 + plugins/dfnet/Makefile.am | 2 + plugins/dfsound/Makefile.am | 3 + plugins/dfxvideo/Makefile.am | 3 + plugins/peopsxgl/Makefile.am | 3 + 10 files changed, 396 insertions(+), 2 deletions(-) (limited to 'plugins') diff --git a/gui/ConfDlg.c b/gui/ConfDlg.c index 30d3df1f..529e2722 100755 --- a/gui/ConfDlg.c +++ b/gui/ConfDlg.c @@ -845,6 +845,7 @@ static void FindNetPlugin() { } GtkWidget *CpuDlg; +GtkWidget *PgxpDlg; GList *psxglist; char *psxtypes[] = { "NTSC", @@ -1033,5 +1034,87 @@ void OnConf_Cpu() { G_CALLBACK(OnCpu_Clicked), builder, (GClosureNotify)g_object_unref, G_CONNECT_AFTER); } +//When a different mode is selected, display some informational text +static void OnPgxp_ModeChanged(GtkWidget *widget, gpointer user_data) { + uint8_t mode; + + mode = gtk_combo_box_get_active(GTK_COMBO_BOX( + gtk_builder_get_object(builder, "PGXP_Mode"))); + + switch (mode) { + case 0: + gtk_label_set_text(GTK_LABEL(gtk_builder_get_object(builder, "PGXP_Mode_title")), + _("Disabled")); + gtk_label_set_text(GTK_LABEL(gtk_builder_get_object(builder, "PGXP_Mode_description")), + _("PGXP is not mirroring any functions currently.")); + break; + case 1: + gtk_label_set_text(GTK_LABEL(gtk_builder_get_object(builder, "PGXP_Mode_title")), + _("Memory operations only")); + gtk_label_set_text(GTK_LABEL(gtk_builder_get_object(builder, "PGXP_Mode_description")), + _("PGXP is mirroring load, store and processor transfer operations of the CPU and GTE.")); + break; + case 2: + gtk_label_set_text(GTK_LABEL(gtk_builder_get_object(builder, "PGXP_Mode_title")), + _("Memory and CPU arithmetic operations")); + gtk_label_set_text(GTK_LABEL(gtk_builder_get_object(builder, "PGXP_Mode_description")), + _("PGXP is mirroring load, store and transfer operations of the CPU and GTE and arithmetic/logic functions of the PSX CPU.\n(WARNING: This mode is currently unfinished and may cause incorrect behaviour in some games).")); + break; + default: + gtk_label_set_text(GTK_LABEL(gtk_builder_get_object(builder, "PGXP_Mode_title")), + _("Error")); + gtk_label_set_text(GTK_LABEL(gtk_builder_get_object(builder, "PGXP_Mode_description")), + _("Unknown mode.")); + } +} + +static void OnPgxp_Clicked(GtkDialog *dialog, gint arg1, gpointer user_data) { + + Config.PGXP_GTE = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON( + gtk_builder_get_object(builder, "PGXP_GTE"))); + Config.PGXP_Cache = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON( + gtk_builder_get_object(builder, "PGXP_Cache"))); + Config.PGXP_Texture = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON( + gtk_builder_get_object(builder, "PGXP_Texture"))); + + Config.PGXP_Mode = gtk_combo_box_get_active(GTK_COMBO_BOX( + gtk_builder_get_object(builder, "PGXP_Mode"))); + + EmuSetPGXPMode(Config.PGXP_Mode); + SaveConfig(); + + gtk_widget_destroy(PgxpDlg); + PgxpDlg = NULL; +} + void OnConf_Pgxp() { + GtkWidget *widget; + char buf[25]; + + builder = gtk_builder_new(); + + if (!gtk_builder_add_from_resource(builder, "/org/pcsxr/gui/pcsxr.ui", NULL)) { + g_warning("Error: interface could not be loaded!"); + return; + } + + PgxpDlg = GTK_WIDGET(gtk_builder_get_object(builder, "PgxpDlg")); + gtk_window_set_default_size(GTK_WINDOW(PgxpDlg), 320, 320); + gtk_widget_show (PgxpDlg); + + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON( + gtk_builder_get_object(builder, "PGXP_GTE")), Config.PGXP_GTE); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON( + gtk_builder_get_object(builder, "PGXP_Cache")), Config.PGXP_Cache); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON( + gtk_builder_get_object(builder, "PGXP_Texture")), Config.PGXP_Texture); + + gtk_combo_box_set_active(GTK_COMBO_BOX( + gtk_builder_get_object(builder, "PGXP_Mode")), Config.PGXP_Mode); + OnPgxp_ModeChanged(NULL, NULL); + + g_signal_connect_data(G_OBJECT(gtk_builder_get_object(builder, "PGXP_Mode")), "changed", + G_CALLBACK(OnPgxp_ModeChanged), builder, NULL, G_CONNECT_AFTER); + g_signal_connect_data(G_OBJECT(PgxpDlg), "response", + G_CALLBACK(OnPgxp_Clicked), builder, (GClosureNotify)g_object_unref, G_CONNECT_AFTER); } diff --git a/gui/Makefile.am b/gui/Makefile.am index ebae1d48..7db62f01 100644 --- a/gui/Makefile.am +++ b/gui/Makefile.am @@ -77,3 +77,5 @@ GtkResources.h: pcsxr.gresource.xml $(pcsxr_gresource) pcsxr_LDADD = \ ../libpcsxcore/libpcsxcore.a \ $(GTK3_LIBS) -lpthread -lz -lm -lXext -lXtst + +CLEANFILES = pcsxr.gresource.xml GtkResources.c GtkResources.h diff --git a/gui/data/pcsxr.ui b/gui/data/pcsxr.ui index 6cc4b24f..35937bfb 100644 --- a/gui/data/pcsxr.ui +++ b/gui/data/pcsxr.ui @@ -1,5 +1,5 @@ - + @@ -32,6 +32,9 @@ + + + False @@ -214,6 +217,9 @@ closbutton1 + + + False @@ -919,6 +925,9 @@ btn_ConfClose + + + False @@ -1731,6 +1740,9 @@ McdClose + + + False @@ -2013,6 +2025,9 @@ memview_close + + + False @@ -2169,6 +2184,9 @@ closebutton2 + + + True @@ -2239,7 +2257,6 @@ True False - 0.49000000953674316 pcsxr-cd-open 1 @@ -2303,6 +2320,12 @@ pcsxr-plugin-sio1 1 + + True + False + pcsxr-pgxp + 1 + True False @@ -2835,6 +2858,23 @@ False + + + _PGXP... + True + False + True + image43 + False + + + + + + True + False + + _CPU... @@ -3128,6 +3168,9 @@ + + + @@ -3745,6 +3788,9 @@ closebutton + + + @@ -4417,5 +4463,249 @@ closebutton1 + + + + + + + + + + + + Disabled + + + Memory only + + + Memory + Cpu logic + + + + + False + Configure PGXP + False + True + center-on-parent + dialog + + + False + vertical + + + False + end + + + gtk-close + True + True + True + True + + + False + False + 0 + + + + + False + False + 1 + + + + + True + False + vertical + 5 + + + True + False + 0 + + + True + False + 12 + + + True + False + vertical + + + Enable PGXP GTE vertex creation + True + True + False + True + + + False + True + 0 + + + + + Enable vertex caching. + True + True + False + True + + + False + True + 1 + + + + + Enable perspective correct texturing. + True + True + False + True + + + False + True + 2 + + + + + + + + + True + False + Options + + + + + + + + False + True + 0 + + + + + True + False + 0 + + + True + False + 12 + + + True + False + vertical + top + + + True + False + 40 + 40 + liststore6 + + + + 0 + + + + + False + True + 0 + + + + + True + False + start + 4 + 4 + + + + + + False + True + 1 + + + + + True + False + 10 + True + 20 + + + True + True + 2 + + + + + + + + + True + False + Select PGXP Mode + + + + + + + + True + True + 1 + + + + + True + True + 0 + + + + + + PgxpDlg_close + + + + diff --git a/plugins/bladesio1/Makefile.am b/plugins/bladesio1/Makefile.am index 880aa647..badd57e5 100644 --- a/plugins/bladesio1/Makefile.am +++ b/plugins/bladesio1/Makefile.am @@ -38,3 +38,6 @@ GtkResources.h: bladesio1.gresource.xml $(bladesio1_gresource) #glade_DATA = sio1.ui #gladedir = $(datadir)/psemu/ EXTRA_DIST = $(glade_DATA) + +CLEANFILES = bladesio1.gresource.xml GtkResources.c GtkResources.h + diff --git a/plugins/dfcdrom/Makefile.am b/plugins/dfcdrom/Makefile.am index 4b3dec4b..1f87998b 100644 --- a/plugins/dfcdrom/Makefile.am +++ b/plugins/dfcdrom/Makefile.am @@ -53,3 +53,6 @@ GtkResources.h: dfcdrom.gresource.xml $(dfcdrom_gresource) #glade_DATA = cdrcfg-0.1df/dfcdrom.ui #gladedir = $(datadir)/psemu/ EXTRA_DIST = $(glade_DATA) + +CLEANFILES = dfcdrom.gresource.xml GtkResources.c GtkResources.h + diff --git a/plugins/dfinput/Makefile.am b/plugins/dfinput/Makefile.am index 11eee3eb..458259c5 100644 --- a/plugins/dfinput/Makefile.am +++ b/plugins/dfinput/Makefile.am @@ -39,3 +39,5 @@ GtkResources.h: dfinput.gresource.xml $(dfinput_gresource) #glade_DATA = dfinput.ui #gladedir = $(datadir)/psemu/ EXTRA_DIST = $(glade_DATA) + +CLEANFILES = dfinput.gresource.xml GtkResources.c GtkResources.h diff --git a/plugins/dfnet/Makefile.am b/plugins/dfnet/Makefile.am index 4000b8c4..f0a53ea0 100755 --- a/plugins/dfnet/Makefile.am +++ b/plugins/dfnet/Makefile.am @@ -38,3 +38,5 @@ GtkResources.h: dfnet.gresource.xml $(dfnet_gresource) #glade_DATA = dfnet.ui #gladedir = $(datadir)/psemu/ EXTRA_DIST = $(glade_DATA) + +CLEANFILES = dfnet.gresource.xml GtkResources.c GtkResources.h diff --git a/plugins/dfsound/Makefile.am b/plugins/dfsound/Makefile.am index b34f3267..9f8130a1 100755 --- a/plugins/dfsound/Makefile.am +++ b/plugins/dfsound/Makefile.am @@ -74,3 +74,6 @@ GtkResources.h: dfsound.gresource.xml $(dfsound_gresource) #glade_DATA = spucfg-0.1df/dfsound.ui #gladedir = $(datadir)/psemu/ EXTRA_DIST = $(glade_DATA) + +CLEANFILES = dfsound.gresource.xml GtkResources.c GtkResources.h + diff --git a/plugins/dfxvideo/Makefile.am b/plugins/dfxvideo/Makefile.am index 86e8ef3a..520749b2 100755 --- a/plugins/dfxvideo/Makefile.am +++ b/plugins/dfxvideo/Makefile.am @@ -52,3 +52,6 @@ GtkResources.h: dfxvideo.gresource.xml $(dfxvideo_gresource) #glade_DATA = gpucfg-0.1df/dfxvideo.ui #gladedir = $(datadir)/psemu/ EXTRA_DIST = $(glade_DATA) + +CLEANFILES = dfxvideo.gresource.xml GtkResources.c GtkResources.h + diff --git a/plugins/peopsxgl/Makefile.am b/plugins/peopsxgl/Makefile.am index a37643e6..576e140d 100755 --- a/plugins/peopsxgl/Makefile.am +++ b/plugins/peopsxgl/Makefile.am @@ -52,3 +52,6 @@ GtkResources.h: peopsxgl.gresource.xml $(peopsxgl_gresource) #glade_DATA = gpucfg/peopsxgl.ui #gladedir = $(datadir)/psemu/ EXTRA_DIST = $(glade_DATA) + +CLEANFILES = peopsxgl.gresource.xml GtkResources.c GtkResources.h + -- cgit v1.2.3 From b6129143f75cf4480883e467d52627de949466fb Mon Sep 17 00:00:00 2001 From: Stelios Tsampas Date: Tue, 18 Jul 2017 23:23:47 +0300 Subject: * Add setting to disable physical gamepad vibration. --- plugins/dfinput/cfg-gtk.c | 25 +++++++++++++ plugins/dfinput/cfg.c | 5 +++ plugins/dfinput/dfinput.ui | 87 ++++++++++++++++++++++++++++++++++------------ plugins/dfinput/pad.h | 1 + plugins/dfinput/sdljoy.c | 2 +- 5 files changed, 97 insertions(+), 23 deletions(-) (limited to 'plugins') diff --git a/plugins/dfinput/cfg-gtk.c b/plugins/dfinput/cfg-gtk.c index 61218cea..6d053af7 100755 --- a/plugins/dfinput/cfg-gtk.c +++ b/plugins/dfinput/cfg-gtk.c @@ -326,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, @@ -335,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(); } @@ -350,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)); @@ -747,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); @@ -766,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", 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 f189d8b3..2d291e22 100644 --- a/plugins/dfinput/dfinput.ui +++ b/plugins/dfinput/dfinput.ui @@ -1,7 +1,7 @@ - + - + @@ -65,7 +65,6 @@ True False Device: - 0 0 @@ -87,7 +86,6 @@ True False Type: - 0 0 @@ -119,13 +117,37 @@ - - Visual vibration + True - True - False - 0 - True + False + + + Visual vibration + True + True + False + True + + + False + True + 0 + + + + + Physical vibration + True + True + False + True + + + False + True + 1 + + False @@ -286,7 +308,6 @@ True False Device: - 0 0 @@ -308,7 +329,6 @@ True False Type: - 0 0 @@ -340,13 +360,37 @@ - - Visual vibration + True - True - False - 0 - True + False + + + Visual vibration + True + True + False + True + + + False + True + 0 + + + + + Physical vibration + True + True + False + True + + + False + True + 1 + + False @@ -511,7 +555,6 @@ True False Device: - 0 0 @@ -687,7 +730,6 @@ True True False - 0 True @@ -702,7 +744,6 @@ True True False - 0 True @@ -717,7 +758,6 @@ True True False - 0 True @@ -775,5 +815,8 @@ + + + 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..d9bc23a3 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); -- cgit v1.2.3 From db51fade6de9461e7a139da2bf5887a9a6569506 Mon Sep 17 00:00:00 2001 From: Stelios Tsampas Date: Thu, 20 Jul 2017 13:04:40 +0300 Subject: * dfinput: Fix possible buffer overflows in the ui. --- plugins/dfinput/cfg-gtk.c | 4 ++-- plugins/dfinput/pad.c | 18 ++++++++++++------ plugins/dfinput/sdljoy.c | 2 +- plugins/dfinput/xkb.c | 4 ++-- 4 files changed, 17 insertions(+), 11 deletions(-) (limited to 'plugins') diff --git a/plugins/dfinput/cfg-gtk.c b/plugins/dfinput/cfg-gtk.c index 6d053af7..bcc733d1 100755 --- a/plugins/dfinput/cfg-gtk.c +++ b/plugins/dfinput/cfg-gtk.c @@ -624,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); diff --git a/plugins/dfinput/pad.c b/plugins/dfinput/pad.c index bd3aef73..8861ec4d 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 +#include +#if !SDL_VERSION_ATLEAST(2,0,0) #include #include #include #endif +#endif #if SDL_VERSION_ATLEAST(2,0,0) int has_haptic; @@ -121,11 +125,13 @@ 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; + SDL_QuitSubSystem(SDL_INIT_JOYSTICK); + if (SDL_InitSubSystem(SDL_INIT_GAMECONTROLLER) == -1) + return PSE_PAD_ERR_FAILURE; + + has_haptic = 0; + if (SDL_InitSubSystem(SDL_INIT_HAPTIC) == 0) + has_haptic = 1; #endif InitSDLJoy(); diff --git a/plugins/dfinput/sdljoy.c b/plugins/dfinput/sdljoy.c index d9bc23a3..3e8cc993 100755 --- a/plugins/dfinput/sdljoy.c +++ b/plugins/dfinput/sdljoy.c @@ -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); } -- cgit v1.2.3 From b117a70fd03d780b5817c635d5c337c6ecc36d94 Mon Sep 17 00:00:00 2001 From: Stelios Tsampas Date: Fri, 28 Jul 2017 13:13:09 +0300 Subject: * Plugin.c: Add PGXP visual debug binding (F11) * GtkGui.c: Fix path saving in file selection dialog * LnxMain.c: Don't look for bios in data directory --- gui/GtkGui.c | 5 ++--- gui/LnxMain.c | 2 -- gui/Plugin.c | 5 +++++ plugins/dfinput/pad.c | 8 +++----- 4 files changed, 10 insertions(+), 10 deletions(-) (limited to 'plugins') diff --git a/gui/GtkGui.c b/gui/GtkGui.c index 970be43b..0fd6b65d 100755 --- a/gui/GtkGui.c +++ b/gui/GtkGui.c @@ -34,6 +34,7 @@ #include "../libpcsxcore/plugins.h" #include "../libpcsxcore/cheat.h" +#include "../libpcsxcore/cdrom.h" #include "MemcardDlg.h" #include "ConfDlg.h" @@ -775,11 +776,9 @@ static gchar *Open_Iso_Proc() { strncpy(current_folder, filename, strrchr(filename, '/') - filename); } - /* If ISO path is NULL save current path. */ - if (!S_ISDIR(sb.st_mode)) { + /* Save current path. */ strcpy(Config.IsoImgDir, current_folder); SaveConfig(); - } /* free useless data */ GSList * ll = l; diff --git a/gui/LnxMain.c b/gui/LnxMain.c index 716a3964..a7f934ae 100755 --- a/gui/LnxMain.c +++ b/gui/LnxMain.c @@ -232,9 +232,7 @@ static void ScanAllPlugins (void) { ScanBios("/usr/local/share/psemu/bios"); ScanBios("/usr/local/share/pcsxr"); ScanBios("/usr/local/share/pcsxr/bios"); - ScanBios(PACKAGE_DATA_DIR); ScanBios(PSEMU_DATA_DIR); - ScanBios(PACKAGE_DATA_DIR "/bios"); ScanBios(PSEMU_DATA_DIR "/bios"); currentdir = g_strconcat(getenv("HOME"), "/.psemu-plugins/", NULL); diff --git a/gui/Plugin.c b/gui/Plugin.c index 0adf3b5e..55068c31 100755 --- a/gui/Plugin.c +++ b/gui/Plugin.c @@ -30,6 +30,7 @@ #include "../libpcsxcore/plugins.h" #include "../libpcsxcore/spu.h" #include "../libpcsxcore/cdriso.h" +#include "../libpcsxcore/pgxp_mem.h" #include "nopic.h" @@ -241,6 +242,9 @@ void PADhandleKey(int key) { LidInterrupt(); break; + case XK_F11: + GPU_toggleDebug(); + break; case XK_F12: psxReset(); break; @@ -329,6 +333,7 @@ int _OpenPlugins() { SPU_registerCallback(SPUirq); ret = GPU_open(&gpuDisp, "PCSXR", NULL); if (ret < 0) { SysMessage(_("Error opening GPU plugin!")); return -1; } + GPU_pgxpMemory(0, PGXP_GetMem()); ret = PAD1_open(&gpuDisp); ret |= PAD1_init(1); // Allow setting to change during run if (ret < 0) { SysMessage(_("Error opening Controller 1 plugin!")); return -1; } diff --git a/plugins/dfinput/pad.c b/plugins/dfinput/pad.c index 8861ec4d..f413d0a4 100755 --- a/plugins/dfinput/pad.c +++ b/plugins/dfinput/pad.c @@ -125,9 +125,7 @@ long PADopen(unsigned long *Disp) { } #if SDL_VERSION_ATLEAST(2,0,0) - SDL_QuitSubSystem(SDL_INIT_JOYSTICK); - if (SDL_InitSubSystem(SDL_INIT_GAMECONTROLLER) == -1) - return PSE_PAD_ERR_FAILURE; + SDL_InitSubSystem(SDL_INIT_GAMECONTROLLER); has_haptic = 0; if (SDL_InitSubSystem(SDL_INIT_HAPTIC) == 0) @@ -497,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) { @@ -516,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]); -- cgit v1.2.3