mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-22 06:05:38 +00:00
Disabled text scrolling when running media player or screensaver or when running in the background.
This commit is contained in:
parent
858677a7d3
commit
42cd0c1ad7
|
@ -1120,8 +1120,10 @@ void FileData::launchGame(Window* window)
|
||||||
|
|
||||||
Scripting::fireEvent("game-end", romPath, getSourceFileData()->metadata.get("name"));
|
Scripting::fireEvent("game-end", romPath, getSourceFileData()->metadata.get("name"));
|
||||||
|
|
||||||
// Re-enable the text scrolling that was disabled in ViewController on game launch.
|
// Unless we're running in the background while the game is launched, re-enable the text
|
||||||
window->setAllowTextScrolling(true);
|
// scrolling that was disabled in ViewController.
|
||||||
|
if (!ViewController::get()->runInBackground(mSystem))
|
||||||
|
window->setAllowTextScrolling(true);
|
||||||
|
|
||||||
// Update number of times the game has been launched.
|
// Update number of times the game has been launched.
|
||||||
FileData* gameToUpdate = getSourceFileData();
|
FileData* gameToUpdate = getSourceFileData();
|
||||||
|
|
|
@ -849,9 +849,12 @@ bool ViewController::input(InputConfig* config, Input input)
|
||||||
// background while a game is launched. If we're in this state and then register some
|
// background while a game is launched. If we're in this state and then register some
|
||||||
// input, it means that the user is back in ES-DE. Therefore unset the game launch flag
|
// input, it means that the user is back in ES-DE. Therefore unset the game launch flag
|
||||||
// and update all the GUI components. This will re-enable the video player and let the
|
// and update all the GUI components. This will re-enable the video player and let the
|
||||||
// screensaver start on schedule again.
|
// screensaver start on schedule again. Also re-enable scrolling for TextListComponent
|
||||||
if (mWindow->getGameLaunchedState())
|
// and ScrollableContainer.
|
||||||
|
if (mWindow->getGameLaunchedState()) {
|
||||||
|
mWindow->setAllowTextScrolling(true);
|
||||||
mWindow->unsetLaunchedGame();
|
mWindow->unsetLaunchedGame();
|
||||||
|
}
|
||||||
|
|
||||||
// Open the main menu.
|
// Open the main menu.
|
||||||
if (!(UIModeController::getInstance()->isUIModeKid() &&
|
if (!(UIModeController::getInstance()->isUIModeKid() &&
|
||||||
|
|
|
@ -709,6 +709,7 @@ void Window::startScreensaver()
|
||||||
(*it)->onScreensaverActivate();
|
(*it)->onScreensaverActivate();
|
||||||
|
|
||||||
stopInfoPopup();
|
stopInfoPopup();
|
||||||
|
setAllowTextScrolling(false);
|
||||||
mScreensaver->startScreensaver(true);
|
mScreensaver->startScreensaver(true);
|
||||||
mRenderScreensaver = true;
|
mRenderScreensaver = true;
|
||||||
}
|
}
|
||||||
|
@ -719,6 +720,7 @@ bool Window::stopScreensaver()
|
||||||
if (mScreensaver && mRenderScreensaver) {
|
if (mScreensaver && mRenderScreensaver) {
|
||||||
mScreensaver->stopScreensaver();
|
mScreensaver->stopScreensaver();
|
||||||
mRenderScreensaver = false;
|
mRenderScreensaver = false;
|
||||||
|
setAllowTextScrolling(true);
|
||||||
|
|
||||||
// Tell the GUI components the screensaver has stopped.
|
// Tell the GUI components the screensaver has stopped.
|
||||||
for (auto it = mGuiStack.cbegin(); it != mGuiStack.cend(); it++) {
|
for (auto it = mGuiStack.cbegin(); it != mGuiStack.cend(); it++) {
|
||||||
|
@ -743,15 +745,19 @@ void Window::renderScreensaver()
|
||||||
void Window::startMediaViewer(FileData* game)
|
void Window::startMediaViewer(FileData* game)
|
||||||
{
|
{
|
||||||
if (mMediaViewer) {
|
if (mMediaViewer) {
|
||||||
if (mMediaViewer->startMediaViewer(game))
|
if (mMediaViewer->startMediaViewer(game)) {
|
||||||
|
setAllowTextScrolling(false);
|
||||||
mRenderMediaViewer = true;
|
mRenderMediaViewer = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Window::stopMediaViewer()
|
void Window::stopMediaViewer()
|
||||||
{
|
{
|
||||||
if (mMediaViewer)
|
if (mMediaViewer) {
|
||||||
mMediaViewer->stopMediaViewer();
|
mMediaViewer->stopMediaViewer();
|
||||||
|
setAllowTextScrolling(true);
|
||||||
|
}
|
||||||
|
|
||||||
mRenderMediaViewer = false;
|
mRenderMediaViewer = false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue