Skip to content

Commit

Permalink
GUI: Do not show splash when ran from launcher
Browse files Browse the repository at this point in the history
  • Loading branch information
sev- committed Nov 11, 2015
1 parent 18bc506 commit 8360d3c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
3 changes: 2 additions & 1 deletion engines/engine.cpp
Expand Up @@ -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"
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions gui/gui-manager.cpp
Expand Up @@ -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));

Expand Down
2 changes: 2 additions & 0 deletions gui/gui-manager.h
Expand Up @@ -98,6 +98,8 @@ class GuiManager : public Common::Singleton<GuiManager> {
*/
bool checkScreenChange();

bool _launched;

protected:
enum RedrawStatus {
kRedrawDisabled = 0,
Expand Down
2 changes: 2 additions & 0 deletions gui/launcher.cpp
Expand Up @@ -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) {
Expand Down

0 comments on commit 8360d3c

Please sign in to comment.