mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-02-18 04:45:39 +00:00
Added a --create-systemdirs command line option to generate the game system directories.
This commit is contained in:
parent
9ca6aac590
commit
43191e4005
|
@ -62,6 +62,7 @@ namespace
|
||||||
int lastTime {0};
|
int lastTime {0};
|
||||||
|
|
||||||
bool forceInputConfig {false};
|
bool forceInputConfig {false};
|
||||||
|
bool createSystemDirectories {false};
|
||||||
bool settingsNeedSaving {false};
|
bool settingsNeedSaving {false};
|
||||||
|
|
||||||
enum loadSystemsReturnCode {
|
enum loadSystemsReturnCode {
|
||||||
|
@ -349,6 +350,9 @@ bool parseArgs(int argc, char* argv[])
|
||||||
else if (strcmp(argv[i], "--force-input-config") == 0) {
|
else if (strcmp(argv[i], "--force-input-config") == 0) {
|
||||||
forceInputConfig = true;
|
forceInputConfig = true;
|
||||||
}
|
}
|
||||||
|
else if (strcmp(argv[i], "--create-systemdirs") == 0) {
|
||||||
|
createSystemDirectories = true;
|
||||||
|
}
|
||||||
else if (strcmp(argv[i], "--debug") == 0) {
|
else if (strcmp(argv[i], "--debug") == 0) {
|
||||||
Settings::getInstance()->setBool("Debug", true);
|
Settings::getInstance()->setBool("Debug", true);
|
||||||
Log::setReportingLevel(LogDebug);
|
Log::setReportingLevel(LogDebug);
|
||||||
|
@ -377,6 +381,7 @@ bool parseArgs(int argc, char* argv[])
|
||||||
" --force-kiosk Force the UI mode to Kiosk\n"
|
" --force-kiosk Force the UI mode to Kiosk\n"
|
||||||
" --force-kid Force the UI mode to Kid\n"
|
" --force-kid Force the UI mode to Kid\n"
|
||||||
" --force-input-config Force configuration of input device\n"
|
" --force-input-config Force configuration of input device\n"
|
||||||
|
" --create-systemdirs Create game system directories\n"
|
||||||
" --home [path] Directory to use as home path\n"
|
" --home [path] Directory to use as home path\n"
|
||||||
" --debug Print debug information\n"
|
" --debug Print debug information\n"
|
||||||
" --version, -v Display version information\n"
|
" --version, -v Display version information\n"
|
||||||
|
@ -543,6 +548,16 @@ int main(int argc, char* argv[])
|
||||||
// Always close the log on exit.
|
// Always close the log on exit.
|
||||||
atexit(&onExit);
|
atexit(&onExit);
|
||||||
|
|
||||||
|
if (createSystemDirectories) {
|
||||||
|
if (!SystemData::createSystemDirectories() && !Settings::getInstance()->getBool("Debug"))
|
||||||
|
std::cout << "System directories successfully created" << std::endl;
|
||||||
|
LOG(LogInfo) << "EmulationStation cleanly shutting down";
|
||||||
|
#if defined(_WIN64)
|
||||||
|
FreeConsole();
|
||||||
|
#endif
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
#if defined(__EMSCRIPTEN__)
|
#if defined(__EMSCRIPTEN__)
|
||||||
// TODO: Remove when application window resizing has been implemented.
|
// TODO: Remove when application window resizing has been implemented.
|
||||||
Settings::getInstance()->setBool("Debug", true);
|
Settings::getInstance()->setBool("Debug", true);
|
||||||
|
|
Loading…
Reference in a new issue