mirror of https://github.com/stella-emu/stella.git
added missing auto detection for manual selected display format "Auto-detect" (50Hz ROM after 60Hz formats)
This commit is contained in:
parent
f37651a46d
commit
a3955553b8
|
@ -305,33 +305,41 @@ bool Console::load(Serializer& in)
|
||||||
void Console::toggleFormat(int direction)
|
void Console::toggleFormat(int direction)
|
||||||
{
|
{
|
||||||
string saveformat, message;
|
string saveformat, message;
|
||||||
|
int format;
|
||||||
|
|
||||||
if(direction == 1)
|
if(direction == 1)
|
||||||
myCurrentFormat = (myCurrentFormat + 1) % 7;
|
format = (myCurrentFormat + 1) % 7;
|
||||||
else if(direction == -1)
|
else if(direction == -1)
|
||||||
myCurrentFormat = myCurrentFormat > 0 ? (myCurrentFormat - 1) : 6;
|
format = myCurrentFormat > 0 ? (myCurrentFormat - 1) : 6;
|
||||||
|
|
||||||
setFormat(myCurrentFormat);
|
setFormat(format);
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void Console::setFormat(int format)
|
void Console::setFormat(int format)
|
||||||
{
|
{
|
||||||
|
if(myCurrentFormat == format)
|
||||||
|
return;
|
||||||
|
|
||||||
string saveformat, message;
|
string saveformat, message;
|
||||||
string autodetected = "";
|
string autodetected = "";
|
||||||
|
bool reset = true;
|
||||||
|
|
||||||
myCurrentFormat = format;
|
myCurrentFormat = format;
|
||||||
switch(myCurrentFormat)
|
switch(myCurrentFormat)
|
||||||
{
|
{
|
||||||
case 0: // auto-detect
|
case 0: // auto-detect
|
||||||
|
{
|
||||||
|
string oldDisplayFormat = myDisplayFormat;
|
||||||
|
autodetectFrameLayout();
|
||||||
myTIA->update();
|
myTIA->update();
|
||||||
myDisplayFormat = myTIA->frameLayout() == FrameLayout::pal ? "PAL" : "NTSC";
|
reset = oldDisplayFormat != myDisplayFormat;
|
||||||
autodetected = "*";
|
|
||||||
message = "Auto-detect mode: " + myDisplayFormat;
|
|
||||||
saveformat = "AUTO";
|
saveformat = "AUTO";
|
||||||
myConsoleTiming = myTIA->frameLayout() == FrameLayout::pal ?
|
autodetected = "*";
|
||||||
ConsoleTiming::pal : ConsoleTiming::ntsc;
|
myConsoleTiming = myDisplayFormat == "PAL" ? ConsoleTiming::pal : ConsoleTiming::ntsc;
|
||||||
|
message = "Auto-detect mode: " + myDisplayFormat;
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case 1:
|
case 1:
|
||||||
saveformat = myDisplayFormat = "NTSC";
|
saveformat = myDisplayFormat = "NTSC";
|
||||||
myConsoleTiming = ConsoleTiming::ntsc;
|
myConsoleTiming = ConsoleTiming::ntsc;
|
||||||
|
@ -367,10 +375,13 @@ void Console::setFormat(int format)
|
||||||
|
|
||||||
myConsoleInfo.DisplayFormat = myDisplayFormat + autodetected;
|
myConsoleInfo.DisplayFormat = myDisplayFormat + autodetected;
|
||||||
|
|
||||||
|
if(reset)
|
||||||
|
{
|
||||||
setPalette(myOSystem.settings().getString("palette"));
|
setPalette(myOSystem.settings().getString("palette"));
|
||||||
setTIAProperties();
|
setTIAProperties();
|
||||||
myTIA->frameReset();
|
myTIA->frameReset();
|
||||||
initializeVideo(); // takes care of refreshing the screen
|
initializeVideo(); // takes care of refreshing the screen
|
||||||
|
}
|
||||||
|
|
||||||
myOSystem.frameBuffer().showMessage(message);
|
myOSystem.frameBuffer().showMessage(message);
|
||||||
|
|
||||||
|
|
|
@ -222,6 +222,9 @@ void TIASurface::enableScanlineInterpolation(bool enable)
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void TIASurface::enablePhosphor(bool enable, int blend)
|
void TIASurface::enablePhosphor(bool enable, int blend)
|
||||||
{
|
{
|
||||||
|
if(myUsePhosphor == enable && myPhosphorPercent == blend / 100.0)
|
||||||
|
return;
|
||||||
|
|
||||||
myUsePhosphor = enable;
|
myUsePhosphor = enable;
|
||||||
if(blend >= 0)
|
if(blend >= 0)
|
||||||
myPhosphorPercent = blend / 100.0;
|
myPhosphorPercent = blend / 100.0;
|
||||||
|
|
Loading…
Reference in New Issue