mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-07 19:23:04 +02:00
Requested fixes (hopefully).
This commit is contained in:
parent
b11b173b60
commit
b844b16285
2 changed files with 33 additions and 31 deletions
|
@ -1337,25 +1337,27 @@ Application::Application(
|
|||
connect(this, &QCoreApplication::aboutToQuit, addressManager.data(), &AddressManager::storeCurrentAddress);
|
||||
|
||||
connect(this, &Application::activeDisplayPluginChanged, this, &Application::updateThreadPoolCount);
|
||||
connect(this, &Application::activeDisplayPluginChanged, this, [=](){
|
||||
qApp->setProperty(hifi::properties::HMD, qApp->isHMDMode());
|
||||
auto displayPlugin = qApp->getActiveDisplayPlugin();
|
||||
if (parser.isSet("system-cursor")) {
|
||||
_preferredCursor.set(Cursor::Manager::getIconName(Cursor::Icon::SYSTEM));
|
||||
|
||||
if (displayPlugin->isHmd()) {
|
||||
if (_preferredCursor.get() == Cursor::Manager::getIconName(Cursor::Icon::RETICLE)) {
|
||||
setPreferredCursor(Cursor::Manager::getIconName(Cursor::Icon::RETICLE));
|
||||
}
|
||||
else {
|
||||
setPreferredCursor(Cursor::Manager::getIconName(Cursor::Icon::ARROW));
|
||||
}
|
||||
}
|
||||
else {
|
||||
setPreferredCursor(Cursor::Manager::getIconName(Cursor::Icon::SYSTEM));
|
||||
}
|
||||
connect(this, &Application::activeDisplayPluginChanged, this, [=](){
|
||||
qApp->setProperty(hifi::properties::HMD, qApp->isHMDMode());
|
||||
auto displayPlugin = qApp->getActiveDisplayPlugin();
|
||||
|
||||
setCrashAnnotation("display_plugin", displayPlugin->getName().toStdString());
|
||||
setCrashAnnotation("hmd", displayPlugin->isHmd() ? "1" : "0");
|
||||
});
|
||||
if (displayPlugin->isHmd()) {
|
||||
if (_preferredCursor.get() == Cursor::Manager::getIconName(Cursor::Icon::RETICLE)) {
|
||||
setPreferredCursor(Cursor::Manager::getIconName(Cursor::Icon::RETICLE));
|
||||
} else {
|
||||
setPreferredCursor(Cursor::Manager::getIconName(Cursor::Icon::ARROW));
|
||||
}
|
||||
} else {
|
||||
setPreferredCursor(Cursor::Manager::getIconName(Cursor::Icon::SYSTEM));
|
||||
}
|
||||
|
||||
setCrashAnnotation("display_plugin", displayPlugin->getName().toStdString());
|
||||
setCrashAnnotation("hmd", displayPlugin->isHmd() ? "1" : "0");
|
||||
});
|
||||
}
|
||||
connect(this, &Application::activeDisplayPluginChanged, this, &Application::updateSystemTabletMode);
|
||||
connect(this, &Application::activeDisplayPluginChanged, this, [&](){
|
||||
if (getLoginDialogPoppedUp()) {
|
||||
|
@ -1472,9 +1474,9 @@ Application::Application(
|
|||
_glWidget->setFocusPolicy(Qt::StrongFocus);
|
||||
_glWidget->setFocus();
|
||||
|
||||
if (parser.isSet("system-cursor")) {
|
||||
/*if (parser.isSet("system-cursor")) { // This is now done above, since the conditional was needed anyway.
|
||||
_preferredCursor.set(Cursor::Manager::getIconName(Cursor::Icon::SYSTEM));
|
||||
}
|
||||
}*/
|
||||
showCursor(Cursor::Manager::lookupIcon(_preferredCursor.get()));
|
||||
|
||||
// enable mouse tracking; otherwise, we only get drag events
|
||||
|
@ -5809,10 +5811,10 @@ void Application::resumeAfterLoginDialogActionTaken() {
|
|||
|
||||
// if the --scripts command-line argument was used.
|
||||
if (_overrideDefaultScriptsLocation && _defaultScriptsLocation.exists()) {
|
||||
scriptEngines->loadDefaultScripts();
|
||||
scriptEngines->loadScripts();
|
||||
scriptEngines->defaultScriptsLocationOverridden(true);
|
||||
} else {
|
||||
scriptEngines->loadScripts();
|
||||
scriptEngines->loadDefaultScripts();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -65,7 +65,7 @@ int main(int argc, const char* argv[]) {
|
|||
setupHifiApplication(BuildInfo::INTERFACE_NAME);
|
||||
|
||||
QCommandLineParser parser;
|
||||
parser.setApplicationDescription("Overte");
|
||||
parser.setApplicationDescription("Overte -- A free/libre and open-source metaverse client");
|
||||
QCommandLineOption helpOption = parser.addHelpOption();
|
||||
QCommandLineOption versionOption = parser.addVersionOption();
|
||||
|
||||
|
@ -148,7 +148,7 @@ int main(int argc, const char* argv[]) {
|
|||
);
|
||||
QCommandLineOption systemCursorOption(
|
||||
"system-cursor",
|
||||
"Probably prevents changing the cursor when application has focus."
|
||||
"Use the default system cursor."
|
||||
);
|
||||
QCommandLineOption concurrentDownloadsOption(
|
||||
"concurrent-downloads",
|
||||
|
@ -182,12 +182,12 @@ int main(int argc, const char* argv[]) {
|
|||
);
|
||||
QCommandLineOption overrideScriptsPathOption(
|
||||
"overrideScriptsPath",
|
||||
"Probably specifies where to look for scripts.",
|
||||
"Specifies path to default directory where the application will look for scripts to load.",
|
||||
"string"
|
||||
);
|
||||
QCommandLineOption defaultScriptOverrideOption(
|
||||
"defaultScriptOverride",
|
||||
"Override defaultsScripts.js.",
|
||||
QCommandLineOption defaultScriptsOverrideOption(
|
||||
"defaultScriptsOverride",
|
||||
"Override default script to run automatically on start. Default is \"defaultsScripts.js\".",
|
||||
"string"
|
||||
);
|
||||
QCommandLineOption responseTokensOption(
|
||||
|
@ -206,13 +206,13 @@ int main(int argc, const char* argv[]) {
|
|||
);
|
||||
QCommandLineOption traceFileOption(
|
||||
"traceFile",
|
||||
"Probably writes a trace to a file? Only works if \"--traceDuration\" is specified.",
|
||||
"Writes a trace to a file in the documents folder. Only works if \"--traceDuration\" is specified.",
|
||||
"path"
|
||||
);
|
||||
QCommandLineOption traceDurationOption(
|
||||
"traceDuration",
|
||||
"Probably a number of seconds? Only works if \"--traceFile\" is specified.",
|
||||
"number"
|
||||
"Automatically quit interface after duration. Only works if \"--traceFile\" is specified.",
|
||||
"seconds"
|
||||
);
|
||||
QCommandLineOption clockSkewOption(
|
||||
"clockSkew",
|
||||
|
@ -269,7 +269,7 @@ int main(int argc, const char* argv[]) {
|
|||
parser.addOption(responseTokensOption);
|
||||
parser.addOption(displayNameOption);
|
||||
parser.addOption(overrideScriptsPathOption);
|
||||
parser.addOption(defaultScriptOverrideOption);
|
||||
parser.addOption(defaultScriptsOverrideOption);
|
||||
parser.addOption(traceFileOption);
|
||||
parser.addOption(traceDurationOption);
|
||||
parser.addOption(clockSkewOption);
|
||||
|
|
Loading…
Reference in a new issue