mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-09 19:57:11 +02:00
add app property when the app was launched from steam
This commit is contained in:
parent
de419c2818
commit
f95a731249
1 changed files with 7 additions and 0 deletions
|
@ -127,13 +127,17 @@ int main(int argc, const char* argv[]) {
|
||||||
QCommandLineParser parser;
|
QCommandLineParser parser;
|
||||||
QCommandLineOption runServerOption("runServer", "Whether to run the server");
|
QCommandLineOption runServerOption("runServer", "Whether to run the server");
|
||||||
QCommandLineOption serverContentPathOption("serverContentPath", "Where to find server content", "serverContentPath");
|
QCommandLineOption serverContentPathOption("serverContentPath", "Where to find server content", "serverContentPath");
|
||||||
|
QCommandLineOption launchedFromSteamOption("launchedFromSteam", "Whether we were launched from SteamVR.");
|
||||||
parser.addOption(runServerOption);
|
parser.addOption(runServerOption);
|
||||||
parser.addOption(serverContentPathOption);
|
parser.addOption(serverContentPathOption);
|
||||||
|
parser.addOption(launchedFromSteamOption);
|
||||||
parser.parse(arguments);
|
parser.parse(arguments);
|
||||||
bool runServer = parser.isSet(runServerOption);
|
bool runServer = parser.isSet(runServerOption);
|
||||||
bool serverContentPathOptionIsSet = parser.isSet(serverContentPathOption);
|
bool serverContentPathOptionIsSet = parser.isSet(serverContentPathOption);
|
||||||
QString serverContentPathOptionValue = serverContentPathOptionIsSet ? parser.value(serverContentPathOption) : QString();
|
QString serverContentPathOptionValue = serverContentPathOptionIsSet ? parser.value(serverContentPathOption) : QString();
|
||||||
|
|
||||||
|
bool launchedFromSteam = parser.isSet(launchedFromSteamOption);
|
||||||
|
|
||||||
QElapsedTimer startupTime;
|
QElapsedTimer startupTime;
|
||||||
startupTime.start();
|
startupTime.start();
|
||||||
|
|
||||||
|
@ -161,6 +165,9 @@ int main(int argc, const char* argv[]) {
|
||||||
QSettings::setDefaultFormat(QSettings::IniFormat);
|
QSettings::setDefaultFormat(QSettings::IniFormat);
|
||||||
Application app(argc, const_cast<char**>(argv), startupTime, runServer, serverContentPathOptionValue);
|
Application app(argc, const_cast<char**>(argv), startupTime, runServer, serverContentPathOptionValue);
|
||||||
|
|
||||||
|
QVariant launchedFromSteamVariant(launchedFromSteam);
|
||||||
|
app.setProperty("com.highfidelity.launchedFromSteam", launchedFromSteamVariant);
|
||||||
|
|
||||||
// If we failed the OpenGLVersion check, log it.
|
// If we failed the OpenGLVersion check, log it.
|
||||||
if (override) {
|
if (override) {
|
||||||
auto accountManager = DependencyManager::get<AccountManager>();
|
auto accountManager = DependencyManager::get<AccountManager>();
|
||||||
|
|
Loading…
Reference in a new issue