From 363d5e10353d32be5ef56ce988358bcf3811245b Mon Sep 17 00:00:00 2001 From: "SND\\weimingzhi_cp" Date: Sun, 18 Jul 2010 06:44:12 +0000 Subject: git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@54862 e17a0e51-4ae3-4d35-97c3-1a29b211df97 --- plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2 | 346 ++++++++------------------ plugins/dfxvideo/gpucfg-0.1df/main.c | 53 +++- 2 files changed, 156 insertions(+), 243 deletions(-) (limited to 'plugins') diff --git a/plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2 b/plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2 index a4f9d68c..ded3c1a2 100644 --- a/plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2 +++ b/plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2 @@ -75,25 +75,6 @@ - - - True - 2 - 320x240 -640x480 -800x600 -1024x768 -1152x864 -1280x1024 -1600x1200 - - - 1 - 2 - GTK_FILL - GTK_FILL - - True @@ -133,6 +114,49 @@ GTK_FILL + + + True + 10 + + + True + 2 + 320x240 +640x480 +800x600 +1024x768 +1152x864 +1280x1024 +1600x1200 + + + 0 + + + + + Fullscreen + True + True + False + True + Toggle windowed/fullscreen mode. + True + True + + + False + False + 1 + + + + + 1 + 2 + + 0 @@ -156,22 +180,6 @@ 0 - - - Fullscreen - True - True - False - Toggle windowed/fullscreen mode. - True - True - - - False - False - 1 - - 1 @@ -227,23 +235,6 @@ 0 - - - Autodetect FPS limit - True - True - False - Enable this if games display too quickly. - True - True - True - - - False - False - 1 - - Enable frame skipping @@ -257,13 +248,13 @@ False False - 2 + 1 True - 2 + 3 12 @@ -271,6 +262,7 @@ True True False + Enable this if games display too quickly. True True @@ -293,11 +285,27 @@ + + + Autodetect FPS limit + True + True + False + True + True + True + True + + + 2 + 3 + + False False - 3 + 2 @@ -356,77 +364,16 @@ True - 11 + 6 2 16 - - - True - 0 - better g-colors, worse textures - - - 1 - 2 - 9 - 10 - GTK_FILL - - - - - - True - 0 - Needed by Dark Forces - - - 1 - 2 - 8 - 9 - GTK_FILL - - - - - - Draw quads with triangles - True - True - False - True - True - - - 9 - 10 - GTK_FILL - - - - - - Repeated flat tex triangles - True - True - False - True - True - - - 8 - 9 - GTK_FILL - - - Disable CPU Saving True True False + For precise framerate True True @@ -443,6 +390,7 @@ True True False + Chrono Cross True True @@ -451,42 +399,13 @@ - - - True - 0 - For precise framerate - - - 1 - 2 - 4 - 5 - GTK_FILL - - - - - - True - 0 - Better FPS limit in some - - - 1 - 2 - 5 - 6 - GTK_FILL - - - PC FPS calculation True True False + Better FPS limit in some True True @@ -497,74 +416,13 @@ - - - True - 0 - Pandemonium 2 - - - 1 - 2 - 6 - 7 - GTK_FILL - - - - - - Lazy screen update - True - True - False - True - True - - - 6 - 7 - GTK_FILL - - - - - - True - 0 - Skip every second frame - - - 1 - 2 - 7 - 8 - GTK_FILL - - - - - - Old frame skipping - True - True - False - True - True - - - 7 - 8 - GTK_FILL - - - Expand screen width True True False + Capcom fighting games True True @@ -581,6 +439,7 @@ True True False + Black screens in Lunar True True @@ -597,6 +456,7 @@ True True False + Compatibility mode True True @@ -608,10 +468,15 @@ - + + Lazy screen update True - 0 - Chrono Cross + True + False + True + Pandemonium 2 + True + True 1 @@ -621,10 +486,15 @@ - + + Old frame skipping True - 0 - Capcom fighting games + True + False + True + Skip every second frame + True + True 1 @@ -636,10 +506,15 @@ - + + Repeated flat tex triangles True - 0 - Black screens in Lunar + True + False + True + Needed by Dark Forces + True + True 1 @@ -651,10 +526,15 @@ - + + Draw quads with triangles True - 0 - Compatibility mode + True + False + True + better g-colors, worse textures + True + True 1 @@ -671,31 +551,23 @@ True True False + True + Toggle busy flags after drawing True True - - 10 - 11 - GTK_FILL - - - - - - True - 0 - Toggle busy flags after drawing - 1 2 - 10 - 11 + 4 + 5 GTK_FILL + + + diff --git a/plugins/dfxvideo/gpucfg-0.1df/main.c b/plugins/dfxvideo/gpucfg-0.1df/main.c index c12cceba..ddc99296 100644 --- a/plugins/dfxvideo/gpucfg-0.1df/main.c +++ b/plugins/dfxvideo/gpucfg-0.1df/main.c @@ -60,6 +60,18 @@ void set_widget_sensitive(GtkWidget *widget, gpointer user_data) gtk_widget_set_sensitive (widget, (int)user_data); } +void on_fullscreen_toggled(GtkWidget *widget, gpointer user_data) +{ + GtkWidget *check, *resCombo2; + GladeXML *xml; + xml = (GladeXML*) user_data; + + check = glade_xml_get_widget(xml, "checkFullscreen"); + resCombo2 = glade_xml_get_widget(xml, "resCombo2"); + + set_widget_sensitive(resCombo2, !gtk_toggle_button_get_active(check)); +} + void on_use_fixes_toggled(GtkWidget *widget, gpointer user_data) { GtkWidget *check, *table_fixes; @@ -74,6 +86,21 @@ void on_use_fixes_toggled(GtkWidget *widget, gpointer user_data) (void *)gtk_toggle_button_get_active (check)); } +void on_fps_toggled(GtkWidget *widget, gpointer user_data) +{ + GtkWidget *checkSetFPS, *checkAutoFPSLimit, *entryFPS; + GladeXML *xml; + + xml = (GladeXML*) user_data; + checkSetFPS = glade_xml_get_widget(xml, "checkSetFPS"); + checkAutoFPSLimit = glade_xml_get_widget(xml, "checkAutoFPSLimit"); + entryFPS = glade_xml_get_widget(xml, "entryFPS"); + + set_widget_sensitive(entryFPS, + gtk_toggle_button_get_active(checkSetFPS) && !gtk_toggle_button_get_active(checkAutoFPSLimit)); + set_widget_sensitive(checkAutoFPSLimit, gtk_toggle_button_get_active(checkSetFPS)); +} + void OnConfigClose(GtkWidget *widget, gpointer user_data) { GladeXML *xml = (GladeXML *)user_data; @@ -226,7 +253,7 @@ main (int argc, char *argv[]) val = set_limit (p, len, 0, 1); } - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (glade_xml_get_widget(xml, "checkAutoFPSLimit")), val); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (glade_xml_get_widget(xml, "checkSetFPS")), val); val=0; if(pB) @@ -235,7 +262,7 @@ main (int argc, char *argv[]) val = set_limit (p, len, 1, 2); } - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (glade_xml_get_widget(xml, "checkSetFPS")), !(val-1)); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (glade_xml_get_widget(xml, "checkAutoFPSLimit")), (val-1)); val=0; if(pB) @@ -291,11 +318,25 @@ main (int argc, char *argv[]) g_signal_connect_data(GTK_OBJECT(widget), "clicked", GTK_SIGNAL_FUNC(OnConfigClose), xml, NULL, G_CONNECT_AFTER); + widget = glade_xml_get_widget(xml, "checkFullscreen"); + g_signal_connect_data(GTK_OBJECT(widget), "clicked", + GTK_SIGNAL_FUNC(on_fullscreen_toggled), xml, NULL, G_CONNECT_AFTER); + widget = glade_xml_get_widget(xml, "checkUseFixes"); g_signal_connect_data(GTK_OBJECT(widget), "clicked", GTK_SIGNAL_FUNC(on_use_fixes_toggled), xml, NULL, G_CONNECT_AFTER); - on_use_fixes_toggled (widget, (gpointer) xml); + widget = glade_xml_get_widget(xml, "checkSetFPS"); + g_signal_connect_data(GTK_OBJECT(widget), "clicked", + GTK_SIGNAL_FUNC(on_fps_toggled), xml, NULL, G_CONNECT_AFTER); + + widget = glade_xml_get_widget(xml, "checkAutoFPSLimit"); + g_signal_connect_data(GTK_OBJECT(widget), "clicked", + GTK_SIGNAL_FUNC(on_fps_toggled), xml, NULL, G_CONNECT_AFTER); + + on_fullscreen_toggled(widget, (gpointer) xml); + on_fps_toggled(widget, (gpointer) xml); + on_use_fixes_toggled(widget, (gpointer) xml); gtk_main (); return 0; @@ -381,11 +422,11 @@ void SaveConfig(GtkWidget *widget, gpointer user_data) val = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (glade_xml_get_widget (xml, "checkShowFPS"))); SetCfgVal(pB,"\nShowFPS",val); - val = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (glade_xml_get_widget (xml, "checkAutoFPSLimit"))); + val = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (glade_xml_get_widget (xml, "checkSetFPS"))); SetCfgVal(pB,"\nUseFrameLimit",val); - val = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (glade_xml_get_widget (xml, "checkSetFPS"))); - SetCfgVal(pB,"\nFPSDetection",(!val)+1); + val = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (glade_xml_get_widget (xml, "checkAutoFPSLimit"))); + SetCfgVal(pB,"\nFPSDetection",val+1); val = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (glade_xml_get_widget (xml, "checkFrameSkip"))); SetCfgVal(pB,"\nUseFrameSkip",val); -- cgit v1.2.3