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)
|
else if(direction == -1)
|
||||||
myCurrentFormat = myCurrentFormat > 0 ? (myCurrentFormat - 1) : 6;
|
myCurrentFormat = myCurrentFormat > 0 ? (myCurrentFormat - 1) : 6;
|
||||||
|
|
||||||
|
setFormat(myCurrentFormat);
|
||||||
|
}
|
||||||
|
|
||||||
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
void Console::setFormat(int format)
|
||||||
|
{
|
||||||
|
string saveformat, message;
|
||||||
|
string autodetected = "";
|
||||||
|
|
||||||
|
myCurrentFormat = format;
|
||||||
switch(myCurrentFormat)
|
switch(myCurrentFormat)
|
||||||
{
|
{
|
||||||
case 0: // auto-detect
|
case 0: // auto-detect
|
||||||
myTIA->update();
|
myTIA->update();
|
||||||
myDisplayFormat = myTIA->frameLayout() == FrameLayout::pal ? "PAL" : "NTSC";
|
myDisplayFormat = myTIA->frameLayout() == FrameLayout::pal ? "PAL" : "NTSC";
|
||||||
|
autodetected = "*";
|
||||||
message = "Auto-detect mode: " + myDisplayFormat;
|
message = "Auto-detect mode: " + myDisplayFormat;
|
||||||
saveformat = "AUTO";
|
saveformat = "AUTO";
|
||||||
myConsoleTiming = myTIA->frameLayout() == FrameLayout::pal ?
|
myConsoleTiming = myTIA->frameLayout() == FrameLayout::pal ?
|
||||||
ConsoleTiming::pal : ConsoleTiming::ntsc;
|
ConsoleTiming::pal : ConsoleTiming::ntsc;
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
saveformat = myDisplayFormat = "NTSC";
|
saveformat = myDisplayFormat = "NTSC";
|
||||||
|
@ -354,6 +365,8 @@ void Console::toggleFormat(int direction)
|
||||||
}
|
}
|
||||||
myProperties.set(Display_Format, saveformat);
|
myProperties.set(Display_Format, saveformat);
|
||||||
|
|
||||||
|
myConsoleInfo.DisplayFormat = myDisplayFormat + autodetected;
|
||||||
|
|
||||||
setPalette(myOSystem.settings().getString("palette"));
|
setPalette(myOSystem.settings().getString("palette"));
|
||||||
setTIAProperties();
|
setTIAProperties();
|
||||||
myTIA->frameReset();
|
myTIA->frameReset();
|
||||||
|
|
|
@ -198,6 +198,11 @@ class Console : public Serializable
|
||||||
*/
|
*/
|
||||||
void toggleFormat(int direction = 1);
|
void toggleFormat(int direction = 1);
|
||||||
|
|
||||||
|
/**
|
||||||
|
Set NTSC/PAL/SECAM (and variants) display format.
|
||||||
|
*/
|
||||||
|
void setFormat(int format);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Toggle between the available palettes.
|
Toggle between the available palettes.
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue