From 5f595b60de8f189c50604be14b53374bcd44b347 Mon Sep 17 00:00:00 2001 From: stephena Date: Sat, 24 Jan 2009 17:32:29 +0000 Subject: [PATCH] Added '-gl_aspectn' and 'gl_aspectp' commandline arguments (and associated UI items) to set the aspect ratio to use in NTSC and PAL modes. This replaces the '-gl_aspect' setting. Hold-select/reset/button0 now work from the UI. Grabmouse can now be set in the UI. Changed status of the fix for ATI/OpenGL/sound from fixed to workaround. Sound will work for the first ROM, but not for subsequent ones. This improves on the previous behaviour, where sound didn't work at all. Bumped version to 2.7.1. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1655 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba --- stella/Changes.txt | 21 ++++-- stella/Todo.txt | 2 + stella/docs/graphics/options_video.png | Bin 6904 -> 7596 bytes stella/docs/index.html | 13 ++-- stella/src/common/FrameBufferGL.cxx | 7 +- stella/src/common/Version.hxx | 4 +- stella/src/common/mainSDL.cxx | 47 +++++-------- stella/src/emucore/FrameBuffer.hxx | 8 +-- stella/src/emucore/OSystem.cxx | 20 ++++-- stella/src/emucore/OSystem.hxx | 6 +- stella/src/emucore/Settings.cxx | 16 +++-- stella/src/gui/LauncherDialog.cxx | 8 +-- stella/src/gui/LauncherDialog.hxx | 4 +- stella/src/gui/ListWidget.cxx | 17 +---- stella/src/gui/VideoDialog.cxx | 92 ++++++++++++++++++------- stella/src/gui/VideoDialog.hxx | 16 +++-- 16 files changed, 169 insertions(+), 112 deletions(-) diff --git a/stella/Changes.txt b/stella/Changes.txt index 35f18e126..9b2bb7a49 100644 --- a/stella/Changes.txt +++ b/stella/Changes.txt @@ -14,10 +14,13 @@ 2.7 to 2.7.1: (Jan. 26, 2009) - * Fixed issue with sound not working in OpenGL video mode in Windows with - ATI video hardware. Related to this, added '-audiofirst' commandline - argument, which initializes audio before video when emulating a ROM - (this is what was causing the sound to not work). + * Partial workaround for sound not working in OpenGL video mode in + Windows with ATI video hardware. Sound will now work for the first ROM + selected, but not for subsequent ones (you will have to quit and + restart Stella for sound to work again). Related to this, added + '-audiofirst' commandline argument, which initializes audio before video + when emulating a ROM. Further work is required to completely fix + this bug. * Fixed bug where volume wasn't being saved in 'Audio Settings' when started from the ROM launcher. @@ -36,6 +39,16 @@ now be changed with the '-eepromdir' commandline argument as well as in the UI. + * Added '-gl_aspectn' and '-gl_aspectp' commandline arguments (and + associated UI items), which replace the previous '-gl_aspect' setting. + The aspect modes can now be set separately for NTSC and PAL mode. + + * Fixed bug with hold-select/reset/button0 when overriding ROM properties; + the checkboxes in the UI weren't actually doing anything. + + * The 'grabmouse' option is now configurable from the UI; previously + it was only accessible from the commandline or its shortcut key. + * Removed 'Emulation_HmoveBlanks' ROM property and associated UI item. You can no longer optionally turn off HMOVE blanking; it is always enabled when necessary. diff --git a/stella/Todo.txt b/stella/Todo.txt index 4def97e2e..a5cc920fc 100644 --- a/stella/Todo.txt +++ b/stella/Todo.txt @@ -36,6 +36,8 @@ Stephen Anthony at stephena@users.sourceforge.net. directory named that way. Basically the same as is currently done for ROMs. + (2) Add popup text widget to dynamically select the entries shown. + * More support for copy and paste. * Fix PropSet to properly delete entries when 'Default' is pressed in diff --git a/stella/docs/graphics/options_video.png b/stella/docs/graphics/options_video.png index fb7100742de15aed2b1762bbd16353ae8765c4b0..0bf94626dcb068c4b7e32627adf2682819d507eb 100644 GIT binary patch literal 7596 zcmb7pcUTkKyY+;Q(vB67k|QD(Kp-H}K@_A23LX$bP!tk6N(veXMHDPF>AeUDhy)}M zNazQp_mYIJ(g{U{fKu<^`Odw+@4J6}Po8;ZvUg_BWbgH^cfD)BxM60PrH;ImMSi_i7jvtj6>f(vT^)wzsJopHvZ<_?ebT4<+qQgpUt%w z@ZshJ>fLv@=@|=)4}2auSOWl(lzJ>T)?${)U15EE@hDKQ9FbSIw{@_J4N!owi35SU z+yD?H007`Mz@ZKRrD~|-(59V9n1(~}bXk6J#yCj|?8L9LHsH9+Z&H|28j$?3EEDk0 ziU&UYB%rz)e=4dMl6bL2F7K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-o=IgL#;UKKJi_C4K;$)i3{302N*k$0E<^3v*y^?6Cy zmKx-YG3@F6zPgGR!8es@_^*8A^gXDvbRHRKW4(mLwGpQ)o?)Wg(=7eUOxL$xAh_i( z#nv`{Q6p;;H09L?>Q&%#&n#HDBMDZPEdv5>mO8@)j#;VFHKCC@tkDQ&qiXAN*eDfd z&Q09G2uci8GzOQf=v`i`Mi!cR0L+O2vAf7%jU38TZn@?DuR68$^Y_hVfr&BmH&B-l z6eaJTrAi1F2U~x`ru?=M$Fbsq3{gR!{r|uqHShGC?V?u^dh6$m(+Q(z+2{PkS95bd z5s!JhDS=?$!`&?L=l|OR{2P{SqM^4IlDy@(2TW)HBsUA@b^SoZiJm?HG;Wb2!evfq YCkx_N@EPyN0Pv%&VQ{BH&F<-c0XY;WxBvhE diff --git a/stella/docs/index.html b/stella/docs/index.html index cd2cff879..087b5cb02 100644 --- a/stella/docs/index.html +++ b/stella/docs/index.html @@ -607,11 +607,12 @@ -
-gl_aspect <number>
+
-gl_aspectn <number>
-gl_aspectp <number>
OpenGL mode only. Specify the amount (as a percentage) to scale the - image width. Since many video modes do not use square pixels, you can - reduce width until the pixels appear square. Allowable values are - 80 - 120; I find 85 - 90 gives the most authentic look. + TIA image width in NTSC and PAL mode. Since many video modes do not + use square pixels, you can reduce width until the pixels appear square. + Allowable values are 80 - 120; I find 85 - 90 gives the most authentic + look for NTSC, and 105 - 110 for PAL. @@ -1065,12 +1066,14 @@ FS Resresolution for fullscreen mode-fullres Timing (*)how to wait between frames (requires restart)-timing GL FilterOpenGL filter mode-gl_filter - GL AspectOpenGL width of window-gl_aspect + GL Aspect (N)OpenGL width of TIA image in NTSC mode-gl_aspectn + GL Aspect (P)OpenGL width of TIA image in PAL mode-gl_aspectp Framerateframes per second in emulation mode-framerate Fullscreen modeself-explanatory-fullscreen PAL color-lossuse PAL color-loss effect-colorloss GL FS Stretchstretch fullscreen OpenGL in emulation mode-gl_fsmax GL VSyncenable OpenGL vertical synchronization-gl_vsync + Grab mousekeep mouse in SDL window-grabmouse Center window (*)attempt to center SDL window (requires restart)-center diff --git a/stella/src/common/FrameBufferGL.cxx b/stella/src/common/FrameBufferGL.cxx index 66ce69ae4..4a0100bce 100644 --- a/stella/src/common/FrameBufferGL.cxx +++ b/stella/src/common/FrameBufferGL.cxx @@ -13,7 +13,7 @@ // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: FrameBufferGL.cxx,v 1.135 2009-01-22 00:49:32 stephena Exp $ +// $Id: FrameBufferGL.cxx,v 1.136 2009-01-24 17:32:29 stephena Exp $ //============================================================================ #ifdef DISPLAY_OPENGL @@ -221,8 +221,9 @@ bool FrameBufferGL::setVidMode(VideoMode& mode) // Aspect ratio and fullscreen stretching only applies to the TIA if(!inUIMode) { - // Aspect ratio - int aspect = myOSystem->settings().getInt("gl_aspect"); + // Aspect ratio (depends on whether NTSC or PAL is detected) + int aspect = myOSystem->settings().getInt( + myOSystem->console().getFramerate() > 55.0 ? "gl_aspectn" : "gl_aspectp"); if(aspect != 100) mode.image_w = (uInt16)(float(mode.image_w * aspect) / 100.0); diff --git a/stella/src/common/Version.hxx b/stella/src/common/Version.hxx index 9611f142e..3e29da6de 100644 --- a/stella/src/common/Version.hxx +++ b/stella/src/common/Version.hxx @@ -13,13 +13,13 @@ // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: Version.hxx,v 1.46 2009-01-19 16:52:32 stephena Exp $ +// $Id: Version.hxx,v 1.47 2009-01-24 17:32:29 stephena Exp $ //============================================================================ #ifndef VERSION_HXX #define VERSION_HXX -#define STELLA_BASE_VERSION "2.7.1_cvs" +#define STELLA_BASE_VERSION "2.7.1" #ifdef NIGHTLY_BUILD #define STELLA_VERSION STELLA_BASE_VERSION "pre-" NIGHTLY_BUILD diff --git a/stella/src/common/mainSDL.cxx b/stella/src/common/mainSDL.cxx index 7f36b8ac3..244c95421 100644 --- a/stella/src/common/mainSDL.cxx +++ b/stella/src/common/mainSDL.cxx @@ -13,7 +13,7 @@ // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: mainSDL.cxx,v 1.86 2009-01-11 19:10:40 stephena Exp $ +// $Id: mainSDL.cxx,v 1.87 2009-01-24 17:32:29 stephena Exp $ //============================================================================ #include @@ -62,13 +62,15 @@ OSystem* theOSystem = (OSystem*) NULL; // Does general Cleanup in case any operation failed (or at end of program) -void Cleanup() +int Cleanup() { if(theOSystem) delete theOSystem; if(SDL_WasInit(SDL_INIT_VIDEO) & SDL_INIT_VIDEO) SDL_Quit(); + + return 0; } @@ -108,7 +110,11 @@ int main(int argc, char* argv[]) // Create the full OSystem after the settings, since settings are // probably needed for defaults - theOSystem->create(); + if(!theOSystem->create()) + { + cout << "ERROR: Couldn't create OSystem" << endl; + return Cleanup(); + } // Check to see if the user requested info about a specific ROM, // or the list of internal ROMs @@ -116,8 +122,7 @@ int main(int argc, char* argv[]) if(theOSystem->settings().getBool("listrominfo")) { theOSystem->propSet().print(); - Cleanup(); - return 0; + return Cleanup(); } else if(theOSystem->settings().getBool("rominfo")) { @@ -126,14 +131,12 @@ int main(int argc, char* argv[]) else cout << "ERROR: ROM doesn't exist" << endl; - Cleanup(); - return 0; + return Cleanup(); } else if(theOSystem->settings().getBool("help")) { theOSystem->settings().usage(); - Cleanup(); - return 0; + return Cleanup(); } // Request that the SDL window be centered, if possible @@ -154,14 +157,11 @@ int main(int argc, char* argv[]) // the ROM actually exists, use it to create a new console. // If not, use the built-in ROM launcher. In this case, we enter 'launcher' // mode and let the main event loop take care of opening a new console/ROM. - FilesystemNode node(romfile); - if(argc == 1 || romfile == "" || !romnode.exists()) { if(!theOSystem->createLauncher()) { - Cleanup(); - return 0; + return Cleanup(); } } else if(theOSystem->createConsole(romfile)) @@ -170,21 +170,10 @@ int main(int argc, char* argv[]) { for(int i = 0; i < 30; ++i) theOSystem->frameBuffer().update(); theOSystem->eventHandler().takeSnapshot(); - Cleanup(); - return 0; + return Cleanup(); } - if(theOSystem->settings().getBool("holdreset")) - theOSystem->eventHandler().handleEvent(Event::ConsoleReset, 1); - - if(theOSystem->settings().getBool("holdselect")) - theOSystem->eventHandler().handleEvent(Event::ConsoleSelect, 1); - - if(theOSystem->settings().getBool("holdbutton0")) - theOSystem->eventHandler().handleEvent(Event::JoystickZeroFire1, 1); - #ifdef DEBUGGER_SUPPORT - // Set up any breakpoint that was on the command line // (and remove the key from the settings, so they won't get set again) const string& initBreak = theOSystem->settings().getString("break"); @@ -201,10 +190,7 @@ int main(int argc, char* argv[]) #endif } else - { - Cleanup(); - return 0; - } + return Cleanup(); // Swallow any spurious events in the queue // These are normally caused by joystick/mouse jitter @@ -215,6 +201,5 @@ int main(int argc, char* argv[]) theOSystem->mainLoop(); // Cleanup time ... - Cleanup(); - return 0; + return Cleanup(); } diff --git a/stella/src/emucore/FrameBuffer.hxx b/stella/src/emucore/FrameBuffer.hxx index cb433dd13..fd9b74f45 100644 --- a/stella/src/emucore/FrameBuffer.hxx +++ b/stella/src/emucore/FrameBuffer.hxx @@ -13,7 +13,7 @@ // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: FrameBuffer.hxx,v 1.116 2009-01-19 16:52:32 stephena Exp $ +// $Id: FrameBuffer.hxx,v 1.117 2009-01-24 17:32:29 stephena Exp $ //============================================================================ #ifndef FRAMEBUFFER_HXX @@ -91,7 +91,7 @@ enum { into FBSurfaces), are in turn drawn here as well. @author Stephen Anthony - @version $Id: FrameBuffer.hxx,v 1.116 2009-01-19 16:52:32 stephena Exp $ + @version $Id: FrameBuffer.hxx,v 1.117 2009-01-24 17:32:29 stephena Exp $ */ class FrameBuffer { @@ -192,7 +192,7 @@ class FrameBuffer /** Toggles between fullscreen and window mode. - Grabmouse activated when in fullscreen mode. + Grabmouse activated when in fullscreen mode. */ void toggleFullscreen(); @@ -563,7 +563,7 @@ class FrameBuffer FrameBuffer type. @author Stephen Anthony - @version $Id: FrameBuffer.hxx,v 1.116 2009-01-19 16:52:32 stephena Exp $ + @version $Id: FrameBuffer.hxx,v 1.117 2009-01-24 17:32:29 stephena Exp $ */ // Text alignment modes for drawString() enum TextAlignment { diff --git a/stella/src/emucore/OSystem.cxx b/stella/src/emucore/OSystem.cxx index 857108621..b10d57909 100644 --- a/stella/src/emucore/OSystem.cxx +++ b/stella/src/emucore/OSystem.cxx @@ -13,7 +13,7 @@ // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: OSystem.cxx,v 1.153 2009-01-22 00:49:32 stephena Exp $ +// $Id: OSystem.cxx,v 1.154 2009-01-24 17:32:29 stephena Exp $ //============================================================================ #include @@ -180,7 +180,8 @@ bool OSystem::create() // Get relevant information about the video hardware // This must be done before any graphics context is created, since // it may be needed to initialize the size of graphical objects - queryVideoHardware(); + if(!queryVideoHardware()) + return false; //////////////////////////////////////////////////////////////////// // Create fonts to draw text @@ -491,6 +492,15 @@ bool OSystem::createConsole(const string& romfile, const string& md5sum) retval = false; } + // Also check if certain virtual buttons should be held down + // These must be checked each time a new console is being created + if(mySettings->getBool("holdreset")) + myEventHandler->handleEvent(Event::ConsoleReset, 1); + if(mySettings->getBool("holdselect")) + myEventHandler->handleEvent(Event::ConsoleSelect, 1); + if(mySettings->getBool("holdbutton0")) + myEventHandler->handleEvent(Event::JoystickZeroFire1, 1); + return retval; } @@ -852,12 +862,12 @@ void OSystem::mainLoop() } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -void OSystem::queryVideoHardware() +bool OSystem::queryVideoHardware() { // Go ahead and open the video hardware; we're going to need it eventually if(SDL_WasInit(SDL_INIT_VIDEO) == 0) if(SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER) < 0) - return; + return false; // First get the maximum windowed desktop resolution const SDL_VideoInfo* info = SDL_GetVideoInfo(); @@ -893,6 +903,8 @@ void OSystem::queryVideoHardware() myResolutions.insert_at(0, r); // insert in opposite (of descending) order } } + + return true; } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/stella/src/emucore/OSystem.hxx b/stella/src/emucore/OSystem.hxx index 19dadac92..772af1463 100644 --- a/stella/src/emucore/OSystem.hxx +++ b/stella/src/emucore/OSystem.hxx @@ -13,7 +13,7 @@ // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: OSystem.hxx,v 1.78 2009-01-21 12:03:17 stephena Exp $ +// $Id: OSystem.hxx,v 1.79 2009-01-24 17:32:29 stephena Exp $ //============================================================================ #ifndef OSYSTEM_HXX @@ -56,7 +56,7 @@ typedef Common::Array ResolutionList; other objects belong. @author Stephen Anthony - @version $Id: OSystem.hxx,v 1.78 2009-01-21 12:03:17 stephena Exp $ + @version $Id: OSystem.hxx,v 1.79 2009-01-24 17:32:29 stephena Exp $ */ class OSystem { @@ -422,7 +422,7 @@ class OSystem /** Query the OSystem video hardware for resolution information. */ - virtual void queryVideoHardware(); + virtual bool queryVideoHardware(); /** Set the base directory for all Stella files (these files may be diff --git a/stella/src/emucore/Settings.cxx b/stella/src/emucore/Settings.cxx index 0a6d78c1a..83c74c1d5 100644 --- a/stella/src/emucore/Settings.cxx +++ b/stella/src/emucore/Settings.cxx @@ -13,7 +13,7 @@ // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: Settings.cxx,v 1.162 2009-01-22 00:49:32 stephena Exp $ +// $Id: Settings.cxx,v 1.163 2009-01-24 17:32:29 stephena Exp $ //============================================================================ #include @@ -40,7 +40,8 @@ Settings::Settings(OSystem* osystem) // OpenGL specific options setInternal("gl_filter", "nearest"); - setInternal("gl_aspect", "100"); + setInternal("gl_aspectn", "100"); + setInternal("gl_aspectp", "100"); setInternal("gl_fsmax", "false"); setInternal("gl_lib", "libGL.so"); setInternal("gl_vsync", "false"); @@ -228,9 +229,13 @@ void Settings::validate() if(s != "linear" && s != "nearest") setInternal("gl_filter", "nearest"); - i = getInt("gl_aspect"); + i = getInt("gl_aspectn"); if(i < 80 || i > 120) - setInternal("gl_aspect", "100"); + setInternal("gl_aspectn", "100"); + + i = getInt("gl_aspectp"); + if(i < 80 || i > 120) + setInternal("gl_aspectp", "100"); #endif #ifdef SOUND_SUPPORT @@ -294,7 +299,8 @@ void Settings::usage() << " -gl_filter Type is one of the following:\n" << " nearest Normal scaling (GL_NEAREST)\n" << " linear Blurred scaling (GL_LINEAR)\n" - << " -gl_aspect Scale the width by the given percentage\n" + << " -gl_aspectn Scale the TIA width by the given percentage in NTSC mode\n" + << " -gl_aspectp Scale the TIA width by the given percentage in PAL mode\n" << " -gl_fsmax <1|0> Stretch GL image in fullscreen emulation mode\n" << " -gl_vsync <1|0> Enable synchronize to vertical blank interrupt\n" << " -gl_texrect <1|0> Enable GL_TEXTURE_RECTANGLE extension\n" diff --git a/stella/src/gui/LauncherDialog.cxx b/stella/src/gui/LauncherDialog.cxx index c9735f113..457422a4b 100644 --- a/stella/src/gui/LauncherDialog.cxx +++ b/stella/src/gui/LauncherDialog.cxx @@ -13,7 +13,7 @@ // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: LauncherDialog.cxx,v 1.102 2009-01-16 14:57:52 stephena Exp $ +// $Id: LauncherDialog.cxx,v 1.103 2009-01-24 17:32:29 stephena Exp $ // // Based on code from ScummVM - Scumm Interpreter // Copyright (C) 2002-2004 The ScummVM project @@ -63,9 +63,9 @@ LauncherDialog::LauncherDialog(OSystem* osystem, DialogContainer* parent, { const GUI::Font& font = instance().launcherFont(); - const int fontHeight = font.getFontHeight(); - const int bwidth = (_w - 2 * 10 - 8 * (4 - 1)) / 4; - const int bheight = font.getLineHeight() + 4; + const int fontHeight = font.getFontHeight(), + bwidth = (_w - 2 * 10 - 8 * (4 - 1)) / 4, + bheight = font.getLineHeight() + 4; int xpos = 0, ypos = 0, lwidth = 0; WidgetArray wid; diff --git a/stella/src/gui/LauncherDialog.hxx b/stella/src/gui/LauncherDialog.hxx index 6121116f8..31f46e70e 100644 --- a/stella/src/gui/LauncherDialog.hxx +++ b/stella/src/gui/LauncherDialog.hxx @@ -13,7 +13,7 @@ // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: LauncherDialog.hxx,v 1.40 2009-01-05 19:44:29 stephena Exp $ +// $Id: LauncherDialog.hxx,v 1.41 2009-01-24 17:32:29 stephena Exp $ // // Based on code from ScummVM - Scumm Interpreter // Copyright (C) 2002-2004 The ScummVM project @@ -34,6 +34,7 @@ class GlobalPropsDialog; class LauncherFilterDialog; class OSystem; class Properties; +class EditTextWidget; class RomInfoWidget; class StaticTextWidget; class StringListWidget; @@ -89,6 +90,7 @@ class LauncherDialog : public Dialog StaticTextWidget* myDirLabel; StaticTextWidget* myDir; StaticTextWidget* myRomCount; + EditTextWidget* myFilename; GameList* myGameList; OptionsDialog* myOptions; diff --git a/stella/src/gui/ListWidget.cxx b/stella/src/gui/ListWidget.cxx index 94ca7d2fb..f5c6d999a 100644 --- a/stella/src/gui/ListWidget.cxx +++ b/stella/src/gui/ListWidget.cxx @@ -13,7 +13,7 @@ // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: ListWidget.cxx,v 1.54 2009-01-05 22:05:35 stephena Exp $ +// $Id: ListWidget.cxx,v 1.55 2009-01-24 17:32:29 stephena Exp $ // // Based on code from ScummVM - Scumm Interpreter // Copyright (C) 2002-2004 The ScummVM project @@ -208,17 +208,6 @@ int ListWidget::findItem(int x, int y) const return (y - 1) / _fontHeight + _currentPos; } -// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -static bool matchingCharsIgnoringCase(string s, string pattern) -{ - // Make the strings uppercase so we can compare them - transform(s.begin(), s.end(), s.begin(), (int(*)(int)) toupper); - transform(pattern.begin(), pattern.end(), pattern.begin(), (int(*)(int)) toupper); - - // Make sure that if the pattern is found, it occurs at the start of 's' - return (s.find(pattern, 0) == string::size_type(0)); -} - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - bool ListWidget::handleKeyDown(int ascii, int keycode, int modifiers) { @@ -250,8 +239,8 @@ bool ListWidget::handleKeyDown(int ascii, int keycode, int modifiers) int newSelectedItem = 0; for (StringList::const_iterator i = _list.begin(); i != _list.end(); ++i) { - const bool match = matchingCharsIgnoringCase(*i, _quickSelectStr); - if (match) + if(BSPF_strncasecmp((*i).c_str(), _quickSelectStr.c_str(), + _quickSelectStr.length()) == 0) { _selectedItem = newSelectedItem; break; diff --git a/stella/src/gui/VideoDialog.cxx b/stella/src/gui/VideoDialog.cxx index d11c08500..4f9388b87 100644 --- a/stella/src/gui/VideoDialog.cxx +++ b/stella/src/gui/VideoDialog.cxx @@ -13,7 +13,7 @@ // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: VideoDialog.cxx,v 1.65 2009-01-22 00:49:32 stephena Exp $ +// $Id: VideoDialog.cxx,v 1.66 2009-01-24 17:32:29 stephena Exp $ // // Based on code from ScummVM - Scumm Interpreter // Copyright (C) 2002-2004 The ScummVM project @@ -47,15 +47,15 @@ VideoDialog::VideoDialog(OSystem* osystem, DialogContainer* parent, buttonWidth = font.getStringWidth("Defaults") + 20, buttonHeight = font.getLineHeight() + 4; int xpos, ypos; - int lwidth = font.getStringWidth("Dirty Rects: "), + int lwidth = font.getStringWidth("GL Aspect (P): "), pwidth = font.getStringWidth("1920x1200"), fwidth = font.getStringWidth("Renderer: "); WidgetArray wid; StringMap items; // Set real dimensions - _w = 46 * fontWidth + 10; - _h = 12 * (lineHeight + 4) + 10; + _w = 48 * fontWidth + 10; + _h = 13 * (lineHeight + 4) + 10; xpos = 5; ypos = 10; @@ -122,16 +122,28 @@ VideoDialog::VideoDialog(OSystem* osystem, DialogContainer* parent, wid.push_back(myGLFilterPopup); ypos += lineHeight + 4; - // GL aspect ratio - myAspectRatioSlider = + // GL aspect ratio (NTSC mode) + myNAspectRatioSlider = new SliderWidget(this, font, xpos, ypos, pwidth, lineHeight, - "GL Aspect: ", lwidth, kAspectRatioChanged); - myAspectRatioSlider->setMinValue(80); myAspectRatioSlider->setMaxValue(120); - wid.push_back(myAspectRatioSlider); - myAspectRatioLabel = - new StaticTextWidget(this, font, xpos + myAspectRatioSlider->getWidth() + 4, + "GL Aspect (N): ", lwidth, kNAspectRatioChanged); + myNAspectRatioSlider->setMinValue(80); myNAspectRatioSlider->setMaxValue(120); + wid.push_back(myNAspectRatioSlider); + myNAspectRatioLabel = + new StaticTextWidget(this, font, xpos + myNAspectRatioSlider->getWidth() + 4, ypos + 1, fontWidth * 3, fontHeight, "", kTextAlignLeft); - myAspectRatioLabel->setFlags(WIDGET_CLEARBG); + myNAspectRatioLabel->setFlags(WIDGET_CLEARBG); + ypos += lineHeight + 4; + + // GL aspect ratio (PAL mode) + myPAspectRatioSlider = + new SliderWidget(this, font, xpos, ypos, pwidth, lineHeight, + "GL Aspect (P): ", lwidth, kPAspectRatioChanged); + myPAspectRatioSlider->setMinValue(80); myPAspectRatioSlider->setMaxValue(120); + wid.push_back(myPAspectRatioSlider); + myPAspectRatioLabel = + new StaticTextWidget(this, font, xpos + myPAspectRatioSlider->getWidth() + 4, + ypos + 1, fontWidth * 3, fontHeight, "", kTextAlignLeft); + myPAspectRatioLabel->setFlags(WIDGET_CLEARBG); ypos += lineHeight + 4; // Framerate @@ -146,7 +158,7 @@ VideoDialog::VideoDialog(OSystem* osystem, DialogContainer* parent, myFrameRateLabel->setFlags(WIDGET_CLEARBG); // Move over to the next column - xpos += myAspectRatioSlider->getWidth() + myAspectRatioLabel->getWidth(); + xpos += myNAspectRatioSlider->getWidth() + myNAspectRatioLabel->getWidth(); ypos = 10; // Fullscreen @@ -173,6 +185,12 @@ VideoDialog::VideoDialog(OSystem* osystem, DialogContainer* parent, wid.push_back(myUseVSyncCheckbox); ypos += lineHeight + 4; + // Grab mouse (in windowed mode) + myGrabmouseCheckbox = new CheckboxWidget(this, font, xpos, ypos, + "Grab mouse"); + wid.push_back(myGrabmouseCheckbox); + ypos += lineHeight + 4; + // Center window (in windowed mode) myCenterCheckbox = new CheckboxWidget(this, font, xpos, ypos, "Center window (*)"); @@ -197,13 +215,16 @@ VideoDialog::VideoDialog(OSystem* osystem, DialogContainer* parent, // Disable certain functions when we know they aren't present #ifndef DISPLAY_GL myGLFilterPopup->clearFlags(WIDGET_ENABLED); - myAspectRatioSlider->clearFlags(WIDGET_ENABLED); - myAspectRatioLabel->clearFlags(WIDGET_ENABLED); + myNAspectRatioSlider->clearFlags(WIDGET_ENABLED); + myNAspectRatioLabel->clearFlags(WIDGET_ENABLED); + myPAspectRatioSlider->clearFlags(WIDGET_ENABLED); + myPAspectRatioLabel->clearFlags(WIDGET_ENABLED); myGLStretchCheckbox->clearFlags(WIDGET_ENABLED); myUseVSyncCheckbox->clearFlags(WIDGET_ENABLED); #endif #ifndef WINDOWED_SUPPORT myFullscreenCheckbox->clearFlags(WIDGET_ENABLED); + myGrabmouseCheckbox->clearFlags(WIDGET_ENABLED); myCenterCheckbox->clearFlags(WIDGET_ENABLED); #endif } @@ -249,11 +270,15 @@ void VideoDialog::loadConfig() instance().settings().getString("gl_filter"), "nearest"); myGLFilterPopup->setEnabled(gl); - // GL aspect ratio setting - myAspectRatioSlider->setValue(instance().settings().getInt("gl_aspect")); - myAspectRatioSlider->setEnabled(gl); - myAspectRatioLabel->setLabel(instance().settings().getString("gl_aspect")); - myAspectRatioLabel->setEnabled(gl); + // GL aspect ratio setting (NTSC and PAL) + myNAspectRatioSlider->setValue(instance().settings().getInt("gl_aspectn")); + myNAspectRatioSlider->setEnabled(gl); + myNAspectRatioLabel->setLabel(instance().settings().getString("gl_aspectn")); + myNAspectRatioLabel->setEnabled(gl); + myPAspectRatioSlider->setValue(instance().settings().getInt("gl_aspectp")); + myPAspectRatioSlider->setEnabled(gl); + myPAspectRatioLabel->setLabel(instance().settings().getString("gl_aspectp")); + myPAspectRatioLabel->setEnabled(gl); // Framerate (0 or -1 means disabled) int rate = instance().settings().getInt("framerate"); @@ -276,6 +301,9 @@ void VideoDialog::loadConfig() myUseVSyncCheckbox->setState(instance().settings().getBool("gl_vsync")); myUseVSyncCheckbox->setEnabled(gl); + // Grab mouse + myGrabmouseCheckbox->setState(instance().settings().getBool("grabmouse")); + // Center window myCenterCheckbox->setState(instance().settings().getBool("center")); } @@ -301,8 +329,9 @@ void VideoDialog::saveConfig() // GL Filter setting instance().settings().setString("gl_filter", myGLFilterPopup->getSelectedTag()); - // GL aspect ratio setting - instance().settings().setString("gl_aspect", myAspectRatioLabel->getLabel()); + // GL aspect ratio setting (NTSC and PAL) + instance().settings().setString("gl_aspectn", myNAspectRatioLabel->getLabel()); + instance().settings().setString("gl_aspectp", myPAspectRatioLabel->getLabel()); // Framerate int i = myFrameRateSlider->getValue(); @@ -326,6 +355,10 @@ void VideoDialog::saveConfig() // Use sync to vertical blank (GL mode only) instance().settings().setBool("gl_vsync", myUseVSyncCheckbox->getState()); + // Grab mouse + instance().settings().setBool("grabmouse", myGrabmouseCheckbox->getState()); + instance().frameBuffer().setCursorState(); + // Center window instance().settings().setBool("center", myCenterCheckbox->getState()); @@ -343,8 +376,10 @@ void VideoDialog::setDefaults() myFSResPopup->setSelected("auto", ""); myFrameTimingPopup->setSelected("sleep", ""); myGLFilterPopup->setSelected("nearest", ""); - myAspectRatioSlider->setValue(100); - myAspectRatioLabel->setLabel("100"); + myNAspectRatioSlider->setValue(100); + myNAspectRatioLabel->setLabel("100"); + myPAspectRatioSlider->setValue(100); + myPAspectRatioLabel->setLabel("100"); myFrameRateSlider->setValue(0); myFrameRateLabel->setLabel("0"); @@ -352,6 +387,7 @@ void VideoDialog::setDefaults() myColorLossCheckbox->setState(false); myGLStretchCheckbox->setState(false); myUseVSyncCheckbox->setState(true); + myGrabmouseCheckbox->setState(false); myCenterCheckbox->setState(true); // Make sure that mutually-exclusive items are not enabled at the same time @@ -387,8 +423,12 @@ void VideoDialog::handleCommand(CommandSender* sender, int cmd, setDefaults(); break; - case kAspectRatioChanged: - myAspectRatioLabel->setValue(myAspectRatioSlider->getValue()); + case kNAspectRatioChanged: + myNAspectRatioLabel->setValue(myNAspectRatioSlider->getValue()); + break; + + case kPAspectRatioChanged: + myPAspectRatioLabel->setValue(myPAspectRatioSlider->getValue()); break; case kFrameRateChanged: diff --git a/stella/src/gui/VideoDialog.hxx b/stella/src/gui/VideoDialog.hxx index 5fdc126f3..4b89eecc7 100644 --- a/stella/src/gui/VideoDialog.hxx +++ b/stella/src/gui/VideoDialog.hxx @@ -13,7 +13,7 @@ // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: VideoDialog.hxx,v 1.29 2009-01-06 23:02:18 stephena Exp $ +// $Id: VideoDialog.hxx,v 1.30 2009-01-24 17:32:29 stephena Exp $ // // Based on code from ScummVM - Scumm Interpreter // Copyright (C) 2002-2004 The ScummVM project @@ -56,8 +56,10 @@ class VideoDialog : public Dialog PopUpWidget* myFSResPopup; PopUpWidget* myFrameTimingPopup; PopUpWidget* myGLFilterPopup; - SliderWidget* myAspectRatioSlider; - StaticTextWidget* myAspectRatioLabel; + SliderWidget* myNAspectRatioSlider; + StaticTextWidget* myNAspectRatioLabel; + SliderWidget* myPAspectRatioSlider; + StaticTextWidget* myPAspectRatioLabel; SliderWidget* myFrameRateSlider; StaticTextWidget* myFrameRateLabel; @@ -66,11 +68,13 @@ class VideoDialog : public Dialog CheckboxWidget* myGLStretchCheckbox; CheckboxWidget* myUseVSyncCheckbox; CheckboxWidget* myCenterCheckbox; + CheckboxWidget* myGrabmouseCheckbox; enum { - kAspectRatioChanged = 'VDar', - kFrameRateChanged = 'VDfr', - kFullScrChanged = 'VDfs' + kNAspectRatioChanged = 'VDan', + kPAspectRatioChanged = 'VDap', + kFrameRateChanged = 'VDfr', + kFullScrChanged = 'VDfs' }; };