From 4bbd74c7405749b4a9af8b909f7fde44e9ffc6a4 Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Fri, 4 Nov 2011 06:28:46 +0000 Subject: [PATCH] gtk: added frameskip option; made label case consistent --- changelog.txt | 3 ++- src/drivers/sdl/gui.cpp | 24 ++++++++++++++++++++---- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/changelog.txt b/changelog.txt index 54ee20d7..b1655349 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,4 +1,5 @@ -23-octo-2011 - prg319 - sdl: fix a bug where alt key would get "stuck" when alt tabbing to window +04-novm-2011 - prg318 - gtk: added option for frameskipping and made label case consistent in gui +23-octo-2011 - prg318 - sdl: fix a bug where alt key would get "stuck" when alt tabbing to window 19-octo-2011 - prg318 - scons: "scons install" now installs auxlib and manpage 19-octo-2011 - prg318 - scons: added --prefix option to build system and improved "install" target 18-octo-2011 - prg318 - sdl: new hotkeys added - statestatenext savestateprev - useful for scrolling through savestates on a gamepad. mapped to pgup and pgdown by default diff --git a/src/drivers/sdl/gui.cpp b/src/drivers/sdl/gui.cpp index 63daefae..c79edb86 100644 --- a/src/drivers/sdl/gui.cpp +++ b/src/drivers/sdl/gui.cpp @@ -738,6 +738,7 @@ void openVideoConfig() GtkWidget* palChk; GtkWidget* ppuChk; GtkWidget* spriteLimitChk; + GtkWidget* frameskipChk; GtkWidget* clipSidesChk; GtkWidget* xscaleSpin; GtkWidget* yscaleSpin; @@ -843,8 +844,8 @@ void openVideoConfig() else gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(ppuChk), 0); - // disable 8 sprite limit check - spriteLimitChk = gtk_check_button_new_with_label("Disable Sprite Limit"); + // "disable 8 sprite limit" check + spriteLimitChk = gtk_check_button_new_with_label("Disable sprite limit"); g_signal_connect(spriteLimitChk, "clicked", G_CALLBACK(toggleOption), (gpointer)"SDL.DisableSpriteLimit"); // sync with config @@ -854,8 +855,22 @@ void openVideoConfig() gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(spriteLimitChk), 1); else gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(spriteLimitChk), 0); - // clip sides check - clipSidesChk = gtk_check_button_new_with_label("Clip Sides"); + + // frameskip check + frameskipChk = gtk_check_button_new_with_label("Enable frameskip"); + g_signal_connect(frameskipChk, "clicked", G_CALLBACK(toggleOption), (gpointer)"SDL.Frameskip"); + + // sync with config + buf = 0; + g_config->getOption("SDL.Frameskip", &buf); + if(buf) + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(frameskipChk), 1); + else + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(frameskipChk), 0); + + + // clip sides check + clipSidesChk = gtk_check_button_new_with_label("Clip sides"); g_signal_connect(clipSidesChk, "clicked", G_CALLBACK(toggleOption), (gpointer)"SDL.ClipSides"); // sync with config @@ -900,6 +915,7 @@ void openVideoConfig() #endif gtk_box_pack_start(GTK_BOX(vbox), palChk, FALSE, FALSE,5); gtk_box_pack_start(GTK_BOX(vbox), ppuChk, FALSE, FALSE, 5); + gtk_box_pack_start(GTK_BOX(vbox), frameskipChk, FALSE, FALSE, 5); gtk_box_pack_start(GTK_BOX(vbox), spriteLimitChk, FALSE, FALSE, 5); gtk_box_pack_start(GTK_BOX(vbox), clipSidesChk, FALSE, FALSE, 5); gtk_box_pack_start(GTK_BOX(vbox), xscaleHbox, FALSE, FALSE, 5);