From 267f8a22a36a49150a4390ea6e806e42844e6047 Mon Sep 17 00:00:00 2001 From: stephena Date: Tue, 26 Dec 2006 02:09:29 +0000 Subject: [PATCH] Fixed toggling between display formats, and saving them in GameInfoDialog. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1239 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba --- stella/src/emucore/Console.cxx | 15 +++++++++------ stella/src/gui/GameInfoDialog.cxx | 4 ++-- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/stella/src/emucore/Console.cxx b/stella/src/emucore/Console.cxx index e27c7b84d..13bb3f9ab 100644 --- a/stella/src/emucore/Console.cxx +++ b/stella/src/emucore/Console.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: Console.cxx,v 1.111 2006-12-26 00:39:43 stephena Exp $ +// $Id: Console.cxx,v 1.112 2006-12-26 02:09:29 stephena Exp $ //============================================================================ #include @@ -277,29 +277,32 @@ const Properties& Console::properties() const void Console::toggleFormat() { uInt32 framerate = 60; - if(myDisplayFormat == "NTSC") { - myProperties.set(Display_Format, "PAL"); + myDisplayFormat = "PAL"; + myProperties.set(Display_Format, myDisplayFormat); mySystem->reset(); myOSystem->frameBuffer().showMessage("PAL Mode"); framerate = 50; } else if(myDisplayFormat == "PAL") { - myProperties.set(Display_Format, "PAL60"); + myDisplayFormat = "PAL60"; + myProperties.set(Display_Format, myDisplayFormat); mySystem->reset(); myOSystem->frameBuffer().showMessage("PAL60 Mode"); framerate = 60; } else if(myDisplayFormat == "PAL60") { - myProperties.set(Display_Format, "NTSC"); + myDisplayFormat = "NTSC"; + myProperties.set(Display_Format, myDisplayFormat); mySystem->reset(); + initializeVideo(); myOSystem->frameBuffer().showMessage("NTSC Mode"); framerate = 60; } - myDisplayFormat = myProperties.get(Display_Format); + setPalette(myOSystem->settings().getString("palette")); myOSystem->setFramerate(framerate); myOSystem->sound().setFrameRate(framerate); diff --git a/stella/src/gui/GameInfoDialog.cxx b/stella/src/gui/GameInfoDialog.cxx index 8491f99a6..dcecf6799 100644 --- a/stella/src/gui/GameInfoDialog.cxx +++ b/stella/src/gui/GameInfoDialog.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: GameInfoDialog.cxx,v 1.33 2006-12-26 00:39:44 stephena Exp $ +// $Id: GameInfoDialog.cxx,v 1.34 2006-12-26 02:09:29 stephena Exp $ // // Based on code from ScummVM - Scumm Interpreter // Copyright (C) 2002-2004 The ScummVM project @@ -572,7 +572,7 @@ void GameInfoDialog::saveConfig() // Display properties tag = myFormat->getSelectedTag(); - s = (tag == 3) ? "PAL60" : (tag == 2) ? "PAL" : "NTSC"; + s = (tag == 4) ? "PAL60" : (tag == 3) ? "PAL" : (tag == 2) ? "NTSC" : "AUTO-DETECT"; myGameProperties.set(Display_Format, s); s = myXStart->getEditString();