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

@ -991,12 +991,19 @@ void FrameBuffer::setFullscreen(bool enable)
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void FrameBuffer::toggleFullscreen(bool toggle) 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(); const bool isFullscreen = toggle ? !fullScreen() : fullScreen();
setFullscreen(isFullscreen); setFullscreen(isFullscreen);
if(myBufferType == BufferType::Emulator) if (myBufferType != BufferType::Launcher)
{ {
ostringstream msg; ostringstream msg;
@ -1008,6 +1015,11 @@ void FrameBuffer::toggleFullscreen(bool toggle)
showMessage(msg.str()); showMessage(msg.str());
} }
break;
}
default:
break;
}
} }
#ifdef ADAPTABLE_REFRESH_SUPPORT #ifdef ADAPTABLE_REFRESH_SUPPORT