mirror of https://github.com/stella-emu/stella.git
fixed missing ConsoleInfo.DisplayFormat update
This commit is contained in:
parent
4562e44d59
commit
f37651a46d
|
@ -311,15 +311,26 @@ void Console::toggleFormat(int direction)
|
|||
else if(direction == -1)
|
||||
myCurrentFormat = myCurrentFormat > 0 ? (myCurrentFormat - 1) : 6;
|
||||
|
||||
setFormat(myCurrentFormat);
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void Console::setFormat(int format)
|
||||
{
|
||||
string saveformat, message;
|
||||
string autodetected = "";
|
||||
|
||||
myCurrentFormat = format;
|
||||
switch(myCurrentFormat)
|
||||
{
|
||||
case 0: // auto-detect
|
||||
myTIA->update();
|
||||
myDisplayFormat = myTIA->frameLayout() == FrameLayout::pal ? "PAL" : "NTSC";
|
||||
autodetected = "*";
|
||||
message = "Auto-detect mode: " + myDisplayFormat;
|
||||
saveformat = "AUTO";
|
||||
myConsoleTiming = myTIA->frameLayout() == FrameLayout::pal ?
|
||||
ConsoleTiming::pal : ConsoleTiming::ntsc;
|
||||
ConsoleTiming::pal : ConsoleTiming::ntsc;
|
||||
break;
|
||||
case 1:
|
||||
saveformat = myDisplayFormat = "NTSC";
|
||||
|
@ -354,6 +365,8 @@ void Console::toggleFormat(int direction)
|
|||
}
|
||||
myProperties.set(Display_Format, saveformat);
|
||||
|
||||
myConsoleInfo.DisplayFormat = myDisplayFormat + autodetected;
|
||||
|
||||
setPalette(myOSystem.settings().getString("palette"));
|
||||
setTIAProperties();
|
||||
myTIA->frameReset();
|
||||
|
|
|
@ -198,6 +198,11 @@ class Console : public Serializable
|
|||
*/
|
||||
void toggleFormat(int direction = 1);
|
||||
|
||||
/**
|
||||
Set NTSC/PAL/SECAM (and variants) display format.
|
||||
*/
|
||||
void setFormat(int format);
|
||||
|
||||
/**
|
||||
Toggle between the available palettes.
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue