suppress fullscreen mode switches in Time Machine mode (fixes #670)

This commit is contained in:
thrust26 2020-07-02 09:33:16 +02:00
parent 716cea765f
commit 2245d87875
1 changed files with 24 additions and 12 deletions

View File

@ -992,22 +992,34 @@ void FrameBuffer::setFullscreen(bool enable)
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void FrameBuffer::toggleFullscreen(bool toggle)
{
switch (myOSystem.eventHandler().state())
{
case EventHandlerState::LAUNCHER:
case EventHandlerState::EMULATION:
case EventHandlerState::PAUSE:
case EventHandlerState::DEBUGGER:
{
const bool isFullscreen = toggle ? !fullScreen() : fullScreen();
setFullscreen(isFullscreen);
if(myBufferType == BufferType::Emulator)
if (myBufferType != BufferType::Launcher)
{
ostringstream msg;
msg << "Fullscreen ";
if(isFullscreen)
if (isFullscreen)
msg << "enabled (" << refreshRate() << " Hz)";
else
msg << "disabled";
showMessage(msg.str());
}
break;
}
default:
break;
}
}
#ifdef ADAPTABLE_REFRESH_SUPPORT