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;
|
break;
|
||||||
|
|
||||||
case SystemEvent::WINDOW_FOCUS_LOST:
|
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);
|
setState(EventHandlerState::PAUSE);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -587,9 +587,20 @@ bool OSystem::createLauncher(const string& startdir)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
myLauncherUsed = myLauncherUsed || status;
|
myLauncherUsed = myLauncherUsed || status;
|
||||||
|
myLauncherLostFocus = !status;
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
bool OSystem::launcherLostFocus()
|
||||||
|
{
|
||||||
|
if(myLauncherLostFocus)
|
||||||
|
return true;
|
||||||
|
|
||||||
|
myLauncherLostFocus = true;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
string OSystem::getROMInfo(const FilesystemNode& romfile)
|
string OSystem::getROMInfo(const FilesystemNode& romfile)
|
||||||
{
|
{
|
||||||
|
|
|
@ -379,6 +379,13 @@ class OSystem
|
||||||
*/
|
*/
|
||||||
bool launcherUsed() const { return myLauncherUsed; }
|
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
|
Gets all possible info about the ROM by creating a temporary
|
||||||
Console object and querying it.
|
Console object and querying it.
|
||||||
|
@ -564,6 +571,9 @@ class OSystem
|
||||||
// Indicates whether ROM launcher was ever opened during this run
|
// Indicates whether ROM launcher was ever opened during this run
|
||||||
bool myLauncherUsed{false};
|
bool myLauncherUsed{false};
|
||||||
|
|
||||||
|
// Indicates whether ROM launcher has focus after starting emulation
|
||||||
|
bool myLauncherLostFocus{true};
|
||||||
|
|
||||||
// Indicates whether to stop the main loop
|
// Indicates whether to stop the main loop
|
||||||
bool myQuitLoop{false};
|
bool myQuitLoop{false};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue