mirror of https://github.com/stella-emu/stella.git
fixed #885 (detected settings display overwritten by auto pause)
This commit is contained in:
parent
fc2ae0c585
commit
edef47b4ed
|
@ -380,7 +380,8 @@ void EventHandler::handleSystemEvent(SystemEvent e, int, int)
|
|||
break;
|
||||
|
||||
case SystemEvent::WINDOW_FOCUS_LOST:
|
||||
if(myOSystem.settings().getBool("autopause") && myState == EventHandlerState::EMULATION)
|
||||
if(myOSystem.settings().getBool("autopause") && myState == EventHandlerState::EMULATION
|
||||
&& myOSystem.launcherLostFocus())
|
||||
setState(EventHandlerState::PAUSE);
|
||||
break;
|
||||
|
||||
|
|
|
@ -587,9 +587,20 @@ bool OSystem::createLauncher(const string& startdir)
|
|||
#endif
|
||||
|
||||
myLauncherUsed = myLauncherUsed || status;
|
||||
myLauncherLostFocus = !status;
|
||||
return status;
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
bool OSystem::launcherLostFocus()
|
||||
{
|
||||
if(myLauncherLostFocus)
|
||||
return true;
|
||||
|
||||
myLauncherLostFocus = true;
|
||||
return false;
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
string OSystem::getROMInfo(const FilesystemNode& romfile)
|
||||
{
|
||||
|
|
|
@ -379,6 +379,13 @@ class OSystem
|
|||
*/
|
||||
bool launcherUsed() const { return myLauncherUsed; }
|
||||
|
||||
/**
|
||||
Answers whether the ROM launcher has lost focus after starting emulation.
|
||||
|
||||
@return True if launcher has lost focus, otherwise false
|
||||
*/
|
||||
bool launcherLostFocus();
|
||||
|
||||
/**
|
||||
Gets all possible info about the ROM by creating a temporary
|
||||
Console object and querying it.
|
||||
|
@ -564,6 +571,9 @@ class OSystem
|
|||
// Indicates whether ROM launcher was ever opened during this run
|
||||
bool myLauncherUsed{false};
|
||||
|
||||
// Indicates whether ROM launcher has focus after starting emulation
|
||||
bool myLauncherLostFocus{true};
|
||||
|
||||
// Indicates whether to stop the main loop
|
||||
bool myQuitLoop{false};
|
||||
|
||||
|
|
Loading…
Reference in New Issue