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
This commit is contained in:
stephena 2006-12-26 02:09:29 +00:00
parent 5593970b56
commit 267f8a22a3
2 changed files with 11 additions and 8 deletions

View File

@ -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 <assert.h>
@ -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);

View File

@ -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();