mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-25 15:15:40 +00:00
Qt: Fix -portable CLI parameter
This commit is contained in:
parent
f14d3c6538
commit
daf1080397
|
@ -164,6 +164,10 @@ void NoGUIHost::SetResourcesDirectory()
|
||||||
|
|
||||||
void NoGUIHost::SetDataDirectory()
|
void NoGUIHost::SetDataDirectory()
|
||||||
{
|
{
|
||||||
|
// Already set, e.g. by -portable.
|
||||||
|
if (!EmuFolders::DataRoot.empty())
|
||||||
|
return;
|
||||||
|
|
||||||
if (ShouldUsePortableMode())
|
if (ShouldUsePortableMode())
|
||||||
{
|
{
|
||||||
EmuFolders::DataRoot = EmuFolders::AppRoot;
|
EmuFolders::DataRoot = EmuFolders::AppRoot;
|
||||||
|
@ -1078,9 +1082,6 @@ void NoGUIHost::PrintCommandLineHelp(const char* progname)
|
||||||
std::fprintf(stderr, " -fullscreen: Enters fullscreen mode immediately after starting.\n");
|
std::fprintf(stderr, " -fullscreen: Enters fullscreen mode immediately after starting.\n");
|
||||||
std::fprintf(stderr, " -nofullscreen: Prevents fullscreen mode from triggering if enabled.\n");
|
std::fprintf(stderr, " -nofullscreen: Prevents fullscreen mode from triggering if enabled.\n");
|
||||||
std::fprintf(stderr, " -portable: Forces \"portable mode\", data in same directory.\n");
|
std::fprintf(stderr, " -portable: Forces \"portable mode\", data in same directory.\n");
|
||||||
std::fprintf(stderr, " -nocontroller: Prevents the emulator from polling for controllers.\n"
|
|
||||||
" Try this option if you're having difficulties starting\n"
|
|
||||||
" the emulator.\n");
|
|
||||||
std::fprintf(stderr, " -settings <filename>: Loads a custom settings configuration from the\n"
|
std::fprintf(stderr, " -settings <filename>: Loads a custom settings configuration from the\n"
|
||||||
" specified filename. Default settings applied if file not found.\n");
|
" specified filename. Default settings applied if file not found.\n");
|
||||||
std::fprintf(stderr, " -earlyconsole: Creates console as early as possible, for logging.\n");
|
std::fprintf(stderr, " -earlyconsole: Creates console as early as possible, for logging.\n");
|
||||||
|
@ -1149,13 +1150,6 @@ bool NoGUIHost::ParseCommandLineParametersAndInitializeConfig(int argc, char* ar
|
||||||
AutoBoot(autoboot)->override_fast_boot = false;
|
AutoBoot(autoboot)->override_fast_boot = false;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else if (CHECK_ARG("-nocontroller"))
|
|
||||||
{
|
|
||||||
Log_InfoPrintf("Command Line: Disabling controller support.");
|
|
||||||
// m_flags.disable_controller_interface = true;
|
|
||||||
Panic("Fixme");
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
else if (CHECK_ARG("-resume"))
|
else if (CHECK_ARG("-resume"))
|
||||||
{
|
{
|
||||||
state_index = -1;
|
state_index = -1;
|
||||||
|
@ -1196,8 +1190,7 @@ bool NoGUIHost::ParseCommandLineParametersAndInitializeConfig(int argc, char* ar
|
||||||
else if (CHECK_ARG("-portable"))
|
else if (CHECK_ARG("-portable"))
|
||||||
{
|
{
|
||||||
Log_InfoPrintf("Command Line: Using portable mode.");
|
Log_InfoPrintf("Command Line: Using portable mode.");
|
||||||
// SetUserDirectoryToProgramDirectory();
|
EmuFolders::DataRoot = EmuFolders::AppRoot;
|
||||||
Panic("Fixme");
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else if (CHECK_ARG_PARAM("-settings"))
|
else if (CHECK_ARG_PARAM("-settings"))
|
||||||
|
|
|
@ -250,6 +250,10 @@ void QtHost::SetResourcesDirectory()
|
||||||
|
|
||||||
void QtHost::SetDataDirectory()
|
void QtHost::SetDataDirectory()
|
||||||
{
|
{
|
||||||
|
// Already set, e.g. by -portable.
|
||||||
|
if (!EmuFolders::DataRoot.empty())
|
||||||
|
return;
|
||||||
|
|
||||||
if (ShouldUsePortableMode())
|
if (ShouldUsePortableMode())
|
||||||
{
|
{
|
||||||
EmuFolders::DataRoot = EmuFolders::AppRoot;
|
EmuFolders::DataRoot = EmuFolders::AppRoot;
|
||||||
|
@ -1884,9 +1888,6 @@ void QtHost::PrintCommandLineHelp(const char* progname)
|
||||||
std::fprintf(stderr, " -nogui: Disables main window from being shown, exits on shutdown.\n");
|
std::fprintf(stderr, " -nogui: Disables main window from being shown, exits on shutdown.\n");
|
||||||
std::fprintf(stderr, " -bigpicture: Automatically starts big picture UI.\n");
|
std::fprintf(stderr, " -bigpicture: Automatically starts big picture UI.\n");
|
||||||
std::fprintf(stderr, " -portable: Forces \"portable mode\", data in same directory.\n");
|
std::fprintf(stderr, " -portable: Forces \"portable mode\", data in same directory.\n");
|
||||||
std::fprintf(stderr, " -nocontroller: Prevents the emulator from polling for controllers.\n"
|
|
||||||
" Try this option if you're having difficulties starting\n"
|
|
||||||
" the emulator.\n");
|
|
||||||
std::fprintf(stderr, " -settings <filename>: Loads a custom settings configuration from the\n"
|
std::fprintf(stderr, " -settings <filename>: Loads a custom settings configuration from the\n"
|
||||||
" specified filename. Default settings applied if file not found.\n");
|
" specified filename. Default settings applied if file not found.\n");
|
||||||
std::fprintf(stderr, " -earlyconsole: Creates console as early as possible, for logging.\n");
|
std::fprintf(stderr, " -earlyconsole: Creates console as early as possible, for logging.\n");
|
||||||
|
@ -1966,13 +1967,6 @@ bool QtHost::ParseCommandLineParametersAndInitializeConfig(QApplication& app,
|
||||||
AutoBoot(autoboot)->override_fast_boot = false;
|
AutoBoot(autoboot)->override_fast_boot = false;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else if (CHECK_ARG("-nocontroller"))
|
|
||||||
{
|
|
||||||
Log_InfoPrintf("Command Line: Disabling controller support.");
|
|
||||||
// m_flags.disable_controller_interface = true;
|
|
||||||
Panic("Fixme");
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
else if (CHECK_ARG("-resume"))
|
else if (CHECK_ARG("-resume"))
|
||||||
{
|
{
|
||||||
state_index = -1;
|
state_index = -1;
|
||||||
|
@ -2007,8 +2001,7 @@ bool QtHost::ParseCommandLineParametersAndInitializeConfig(QApplication& app,
|
||||||
else if (CHECK_ARG("-portable"))
|
else if (CHECK_ARG("-portable"))
|
||||||
{
|
{
|
||||||
Log_InfoPrintf("Command Line: Using portable mode.");
|
Log_InfoPrintf("Command Line: Using portable mode.");
|
||||||
// SetUserDirectoryToProgramDirectory();
|
EmuFolders::DataRoot = EmuFolders::AppRoot;
|
||||||
Panic("Fixme");
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else if (CHECK_ARG_PARAM("-settings"))
|
else if (CHECK_ARG_PARAM("-settings"))
|
||||||
|
|
Loading…
Reference in a new issue