fix window position saving when switching from/to fullscreen mode

suppress fullscreen UI message outside emulation mode
This commit is contained in:
thrust26 2020-05-19 08:53:11 +02:00
parent 987bfaab1d
commit 0f751d268c
2 changed files with 12 additions and 8 deletions

View File

@ -482,7 +482,7 @@ int FrameBufferSDL2::gameRefreshRate() const
const string format = myOSystem.console().getFormatString();
const bool isNtsc = format == "NTSC" || format == "PAL60" || format == "SECAM60";
return isNtsc ? 60 : 50; // TODO: check for multiples e.g. 120/100 too
return isNtsc ? 75 : 50; // TODO: check for multiples e.g. 120/100 too
}
return 60;
}

View File

@ -959,6 +959,7 @@ void FrameBuffer::setFullscreen(bool enable)
default:
return;
}
saveCurrentWindowPosition();
// Changing the video mode can take some time, during which the last
// sound played may get 'stuck'
@ -993,15 +994,18 @@ void FrameBuffer::toggleFullscreen(bool toggle)
setFullscreen(isFullscreen);
ostringstream msg;
if(myBufferType == BufferType::Emulator)
{
ostringstream msg;
msg << "Fullscreen ";
if(isFullscreen)
msg << "enabled (" << refreshRate() << " Hz)";
else
msg << "disabled";
msg << "Fullscreen ";
if(isFullscreen)
msg << "enabled (" << refreshRate() << " Hz)";
else
msg << "disabled";
showMessage(msg.str());
showMessage(msg.str());
}
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -