From 8360d3cd6f4e4beeb6564363a49e9b4a0de64b15 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Wed, 11 Nov 2015 21:36:27 +0100 Subject: GUI: Do not show splash when ran from launcher --- engines/engine.cpp | 3 ++- gui/gui-manager.cpp | 2 ++ gui/gui-manager.h | 2 ++ gui/launcher.cpp | 2 ++ 4 files changed, 8 insertions(+), 1 deletion(-) diff --git a/engines/engine.cpp b/engines/engine.cpp index 54fe1777df..aedcb11b28 100644 --- a/engines/engine.cpp +++ b/engines/engine.cpp @@ -50,6 +50,7 @@ #include "backends/keymapper/keymapper.h" +#include "gui/gui-manager.h" #include "gui/debugger.h" #include "gui/dialog.h" #include "gui/message.h" @@ -303,7 +304,7 @@ void initGraphics(int width, int height, bool defaultTo1xScaler, const Graphics: OSystem::TransactionError gfxError = g_system->endGFXTransaction(); - if (!splash) + if (!splash && !GUI::GuiManager::instance()._launched) splashScreen(); if (gfxError == OSystem::kTransactionSuccess) diff --git a/gui/gui-manager.cpp b/gui/gui-manager.cpp index 9b6cf5a0b6..20c6d3fa13 100644 --- a/gui/gui-manager.cpp +++ b/gui/gui-manager.cpp @@ -64,6 +64,8 @@ GuiManager::GuiManager() : _redrawStatus(kRedrawDisabled), _stateIsSaved(false), _width = _system->getOverlayWidth(); _height = _system->getOverlayHeight(); + _launched = false; + // Clear the cursor memset(_cursor, 0xFF, sizeof(_cursor)); diff --git a/gui/gui-manager.h b/gui/gui-manager.h index 4186a93ccb..26c8d6def9 100644 --- a/gui/gui-manager.h +++ b/gui/gui-manager.h @@ -98,6 +98,8 @@ public: */ bool checkScreenChange(); + bool _launched; + protected: enum RedrawStatus { kRedrawDisabled = 0, diff --git a/gui/launcher.cpp b/gui/launcher.cpp index 5abf0aba26..bae894cba1 100644 --- a/gui/launcher.cpp +++ b/gui/launcher.cpp @@ -683,6 +683,8 @@ LauncherDialog::LauncherDialog() // Create Load dialog _loadDialog = new SaveLoadChooser(_("Load game:"), _("Load"), false); + + GUI::GuiManager::instance()._launched = true; } void LauncherDialog::selectTarget(const String &target) { -- cgit v1.2.3