mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-03-06 14:27:43 +00:00
[ScreenSaver] Consume input on cancel
This commit is contained in:
parent
f7af8357f8
commit
9362967880
|
@ -139,10 +139,6 @@ void Window::input(InputConfig* config, Input input)
|
||||||
mSleeping = true;
|
mSleeping = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*else if(input.value != 0)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}*/
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -157,7 +153,8 @@ void Window::input(InputConfig* config, Input input)
|
||||||
}
|
}
|
||||||
|
|
||||||
mTimeSinceLastInput = 0;
|
mTimeSinceLastInput = 0;
|
||||||
cancelScreenSaver();
|
if (cancelScreenSaver())
|
||||||
|
return;
|
||||||
|
|
||||||
if(config->getDeviceId() == DEVICE_KEYBOARD && input.value && input.id == SDLK_g && SDL_GetModState() & KMOD_LCTRL && Settings::getInstance()->getBool("Debug"))
|
if(config->getDeviceId() == DEVICE_KEYBOARD && input.value && input.id == SDLK_g && SDL_GetModState() & KMOD_LCTRL && Settings::getInstance()->getBool("Debug"))
|
||||||
{
|
{
|
||||||
|
@ -426,7 +423,7 @@ void Window::startScreenSaver()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Window::cancelScreenSaver()
|
bool Window::cancelScreenSaver()
|
||||||
{
|
{
|
||||||
if (mScreenSaver && mRenderScreenSaver)
|
if (mScreenSaver && mRenderScreenSaver)
|
||||||
{
|
{
|
||||||
|
@ -437,7 +434,11 @@ void Window::cancelScreenSaver()
|
||||||
// Tell the GUI components the screensaver has stopped
|
// Tell the GUI components the screensaver has stopped
|
||||||
for(auto i = mGuiStack.cbegin(); i != mGuiStack.cend(); i++)
|
for(auto i = mGuiStack.cbegin(); i != mGuiStack.cend(); i++)
|
||||||
(*i)->onScreenSaverDeactivate();
|
(*i)->onScreenSaverDeactivate();
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Window::renderScreenSaver()
|
void Window::renderScreenSaver()
|
||||||
|
|
|
@ -74,7 +74,7 @@ public:
|
||||||
inline void stopInfoPopup() { if (mInfoPopup) mInfoPopup->stop(); };
|
inline void stopInfoPopup() { if (mInfoPopup) mInfoPopup->stop(); };
|
||||||
|
|
||||||
void startScreenSaver();
|
void startScreenSaver();
|
||||||
void cancelScreenSaver();
|
bool cancelScreenSaver();
|
||||||
void renderScreenSaver();
|
void renderScreenSaver();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
Loading…
Reference in a new issue