fix the timing of the launchedFromSteam property

This commit is contained in:
Brad Hefta-Gaub 2016-10-27 10:00:48 -07:00
parent 03946748bc
commit d778b3b4ce
3 changed files with 5 additions and 5 deletions

View file

@ -506,7 +506,7 @@ Q_GUI_EXPORT void qt_gl_set_global_share_context(QOpenGLContext *context);
Setting::Handle<int> sessionRunTime{ "sessionRunTime", 0 };
Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bool runServer, QString runServerPathOption) :
Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bool runServer, QString runServerPathOption, bool launchedFromSteam) :
QApplication(argc, argv),
_shouldRunServer(runServer),
_runServerPath(runServerPathOption),
@ -534,6 +534,8 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo
_maxOctreePPS(maxOctreePacketsPerSecond.get()),
_lastFaceTrackerUpdate(0)
{
setProperty("com.highfidelity.launchedFromSteam", launchedFromSteam);
_runningMarker.startRunningMarker();
PluginContainer* pluginContainer = dynamic_cast<PluginContainer*>(this); // set the container for any plugins that care

View file

@ -139,7 +139,7 @@ public:
static void initPlugins(const QStringList& arguments);
static void shutdownPlugins();
Application(int& argc, char** argv, QElapsedTimer& startup_time, bool runServer, QString runServerPathOption);
Application(int& argc, char** argv, QElapsedTimer& startup_time, bool runServer, QString runServerPathOption, bool launchedFromSteam);
~Application();
void postLambdaEvent(std::function<void()> f) override;

View file

@ -159,10 +159,8 @@ int main(int argc, const char* argv[]) {
int exitCode;
{
QSettings::setDefaultFormat(QSettings::IniFormat);
Application app(argc, const_cast<char**>(argv), startupTime, runServer, serverContentPathOptionValue);
bool launchedFromSteam = SteamClient::isRunning();
app.setProperty("com.highfidelity.launchedFromSteam", launchedFromSteam);
Application app(argc, const_cast<char**>(argv), startupTime, runServer, serverContentPathOptionValue, launchedFromSteam);
// If we failed the OpenGLVersion check, log it.
if (override) {