From e974cd9d43d1f86677e5cd7b261eefc92a9b4b83 Mon Sep 17 00:00:00 2001 From: John Rassa <john@rassaonline.net> Date: Thu, 12 Jan 2017 19:17:53 +0000 Subject: [PATCH] Added a --no-splash option for disableing the ES logo fix indentation --- es-app/src/main.cpp | 8 ++++++-- es-core/src/Settings.cpp | 4 +++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/es-app/src/main.cpp b/es-app/src/main.cpp index 393f199fd..6753b9ae3 100644 --- a/es-app/src/main.cpp +++ b/es-app/src/main.cpp @@ -55,6 +55,9 @@ bool parseArgs(int argc, char* argv[], unsigned int* width, unsigned int* height }else if(strcmp(argv[i], "--no-exit") == 0) { Settings::getInstance()->setBool("ShowExit", false); + }else if(strcmp(argv[i], "--no-splash") == 0) + { + Settings::getInstance()->setBool("SplashScreen", false); }else if(strcmp(argv[i], "--debug") == 0) { Settings::getInstance()->setBool("Debug", true); @@ -91,6 +94,7 @@ bool parseArgs(int argc, char* argv[], unsigned int* width, unsigned int* height "--ignore-gamelist ignore the gamelist (useful for troubleshooting)\n" "--draw-framerate display the framerate\n" "--no-exit don't show the exit option in the menu\n" + "--no-splash don't show the splash screen\n" "--debug more logging, show console on Windows\n" "--scrape scrape using command line interface\n" "--windowed not fullscreen, should be used with --resolution\n" @@ -225,8 +229,8 @@ int main(int argc, char* argv[]) std::string glExts = (const char*)glGetString(GL_EXTENSIONS); LOG(LogInfo) << "Checking available OpenGL extensions..."; LOG(LogInfo) << " ARB_texture_non_power_of_two: " << (glExts.find("ARB_texture_non_power_of_two") != std::string::npos ? "ok" : "MISSING"); - - window.renderLoadingScreen(); + if(Settings::getInstance()->getBool("SplashScreen")) + window.renderLoadingScreen(); } const char* errorMsg = NULL; diff --git a/es-core/src/Settings.cpp b/es-core/src/Settings.cpp index 67f12150d..337dcaac1 100644 --- a/es-core/src/Settings.cpp +++ b/es-core/src/Settings.cpp @@ -17,7 +17,8 @@ std::vector<const char*> settings_dont_save = boost::assign::list_of ("Windowed") ("VSync") ("HideConsole") - ("IgnoreGamelist"); + ("IgnoreGamelist") + ("SplashScreen"); Settings::Settings() { @@ -43,6 +44,7 @@ void Settings::setDefaults() mBoolMap["DrawFramerate"] = false; mBoolMap["ShowExit"] = true; mBoolMap["Windowed"] = false; + mBoolMap["SplashScreen"] = true; #ifdef _RPI_ // don't enable VSync by default on the Pi, since it already