mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-16 06:57:04 +02:00
use SteamClient::isRunning() instead of command line param
This commit is contained in:
parent
5f2b4c2a7f
commit
e464858c4c
1 changed files with 1 additions and 4 deletions
|
@ -127,17 +127,13 @@ int main(int argc, const char* argv[]) {
|
|||
QCommandLineParser parser;
|
||||
QCommandLineOption runServerOption("runServer", "Whether to run the server");
|
||||
QCommandLineOption serverContentPathOption("serverContentPath", "Where to find server content", "serverContentPath");
|
||||
QCommandLineOption launchedFromSteamOption("launchedFromSteam", "Whether we were launched from SteamVR.");
|
||||
parser.addOption(runServerOption);
|
||||
parser.addOption(serverContentPathOption);
|
||||
parser.addOption(launchedFromSteamOption);
|
||||
parser.parse(arguments);
|
||||
bool runServer = parser.isSet(runServerOption);
|
||||
bool serverContentPathOptionIsSet = parser.isSet(serverContentPathOption);
|
||||
QString serverContentPathOptionValue = serverContentPathOptionIsSet ? parser.value(serverContentPathOption) : QString();
|
||||
|
||||
bool launchedFromSteam = parser.isSet(launchedFromSteamOption);
|
||||
|
||||
QElapsedTimer startupTime;
|
||||
startupTime.start();
|
||||
|
||||
|
@ -165,6 +161,7 @@ int main(int argc, const char* argv[]) {
|
|||
QSettings::setDefaultFormat(QSettings::IniFormat);
|
||||
Application app(argc, const_cast<char**>(argv), startupTime, runServer, serverContentPathOptionValue);
|
||||
|
||||
bool launchedFromSteam = SteamClient::isRunning();
|
||||
app.setProperty("com.highfidelity.launchedFromSteam", launchedFromSteam);
|
||||
|
||||
// If we failed the OpenGLVersion check, log it.
|
||||
|
|
Loading…
Reference in a new issue