From f27de7f860f553ae791973eb788608138444021b Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Sun, 12 Jun 2022 10:34:17 +0200 Subject: [PATCH] Added an es_log.txt entry if running in portable mode. --- es-app/src/main.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/es-app/src/main.cpp b/es-app/src/main.cpp index e714311eb..d6bfe357a 100644 --- a/es-app/src/main.cpp +++ b/es-app/src/main.cpp @@ -65,6 +65,7 @@ namespace bool forceInputConfig {false}; bool createSystemDirectories {false}; bool settingsNeedSaving {false}; + bool portableMode {false}; enum loadSystemsReturnCode { LOADING_OK, @@ -195,6 +196,7 @@ bool parseArgs(int argc, char* argv[]) else { std::cout << "Setting home path to \"" << homePath << "\"\n"; Utils::FileSystem::setHomePath(homePath); + portableMode = true; } } portableFile.close(); @@ -223,6 +225,7 @@ bool parseArgs(int argc, char* argv[]) return false; } Utils::FileSystem::setHomePath(argv[i + 1]); + portableMode = false; break; } } @@ -546,6 +549,10 @@ int main(int argc, char* argv[]) LOG(LogInfo) << "EmulationStation Desktop Edition v" << PROGRAM_VERSION_STRING << ", built " << PROGRAM_BUILT_STRING; + if (portableMode) { + LOG(LogInfo) << "Running in portable mode"; + } + // Always close the log on exit. atexit(&onExit);