From 2aca70e19ef58ef5deeed692b2f217b68bc422b9 Mon Sep 17 00:00:00 2001 From: stephena Date: Mon, 17 Dec 2012 22:04:20 +0000 Subject: [PATCH] Fixed PAL autodetection regression. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2571 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba --- Changes.txt | 3 +++ src/common/bspf.hxx | 4 ++-- src/emucore/Console.cxx | 17 ++++++----------- 3 files changed, 11 insertions(+), 13 deletions(-) diff --git a/Changes.txt b/Changes.txt index 0717c4db3..08b6cb992 100644 --- a/Changes.txt +++ b/Changes.txt @@ -14,6 +14,9 @@ 3.7.4 to 3.8: (December xx, 2012) + * Improved regressions in PAL format autodetection, introduced in the + past several releases. + * Fixed crash when loading invalid PNG files in ROM browser. * Snapshots generated by Stella now include more informative info, such diff --git a/src/common/bspf.hxx b/src/common/bspf.hxx index 6039725f7..b9cdc6a6e 100644 --- a/src/common/bspf.hxx +++ b/src/common/bspf.hxx @@ -85,8 +85,8 @@ using namespace std; // I wish Windows had a complete POSIX layer #if defined BSPF_WIN32 && !defined __GNUG__ - #define BSPF_strcasecmp stricmp - #define BSPF_strncasecmp strnicmp + #define BSPF_strcasecmp _stricmp + #define BSPF_strncasecmp _strnicmp #define BSPF_isblank(c) ((c == ' ') || (c == '\t')) #define BSPF_snprintf _snprintf #define BSPF_vsnprintf _vsnprintf diff --git a/src/emucore/Console.cxx b/src/emucore/Console.cxx index cb6d0b165..1057652d3 100644 --- a/src/emucore/Console.cxx +++ b/src/emucore/Console.cxx @@ -75,9 +75,9 @@ Console::Console(OSystem* osystem, Cartridge* cart, const Properties& props) mySystem(0), myCart(cart), myCMHandler(0), - myDisplayFormat("NTSC"), - myFramerate(60.0), - myCurrentFormat(0), + myDisplayFormat(""), // Unknown TV format @ start + myFramerate(0.0), // Unknown framerate @ start + myCurrentFormat(0), // Unknown format @ start myUserPaletteDefined(false) { // Load user-defined palette for this ROM @@ -596,19 +596,14 @@ void Console::setTIAProperties() // Make sure these values fit within the bounds of the desktop // If not, attempt to center vertically - if(height <= myOSystem->desktopHeight()) - { - myTIA->setYStart(ystart); - myTIA->setHeight(height); - } - else + if(height > myOSystem->desktopHeight()) { ystart += height - myOSystem->desktopHeight(); ystart = BSPF_min(ystart, 64u); height = myOSystem->desktopHeight(); - myTIA->setYStart(ystart); - myTIA->setHeight(height); } + myTIA->setYStart(ystart); + myTIA->setHeight(height); } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -