History

Since switching to system mouse due to eco mode trailing mouse issues, this in turn caused hmd mode to render a blank mouse. Added a mouse setting functionality on activeplugin change lambda so taht when in hmd mode it uses either reticle mouse, if selected, or arrow. Othewise if non hmd use system mouse.

amer cerkic committed 7 years ago

Commit 75beb951 parent df34e2f1 file · +14 −1Browse files

Showing the changes to interface/src/Application.cpp (1 of 1 file). Show all

Unified · Split

interface/src/Application.cpp+14−1
@@ -1345,9 +1345,22 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo · 1344 unmodified lines
1345 connect(this, &QCoreApplication::aboutToQuit, addressManager.data(), &AddressManager::storeCurrentAddress);1345 connect(this, &QCoreApplication::aboutToQuit, addressManager.data(), &AddressManager::storeCurrentAddress);
1346 1346
1347 connect(this, &Application::activeDisplayPluginChanged, this, &Application::updateThreadPoolCount);1347 connect(this, &Application::activeDisplayPluginChanged, this, &Application::updateThreadPoolCount);
1348 connect(this, &Application::activeDisplayPluginChanged, this, [](){1348 connect(this, &Application::activeDisplayPluginChanged, this, [=](){
1349 qApp->setProperty(hifi::properties::HMD, qApp->isHMDMode());1349 qApp->setProperty(hifi::properties::HMD, qApp->isHMDMode());
1350 auto displayPlugin = qApp->getActiveDisplayPlugin();1350 auto displayPlugin = qApp->getActiveDisplayPlugin();
1351
1352 if (displayPlugin->isHmd()) {
1353 if (_preferredCursor.get() == Cursor::Manager::getIconName(Cursor::Icon::RETICLE)) {
1354 setPreferredCursor(Cursor::Manager::getIconName(Cursor::Icon::RETICLE));
1355 }
1356 else {
1357 setPreferredCursor(Cursor::Manager::getIconName(Cursor::Icon::ARROW));
1358 }
1359 }
1360 else {
1361 setPreferredCursor(Cursor::Manager::getIconName(Cursor::Icon::SYSTEM));
1362 }
1363
1351 setCrashAnnotation("display_plugin", displayPlugin->getName().toStdString());1364 setCrashAnnotation("display_plugin", displayPlugin->getName().toStdString());
1352 setCrashAnnotation("hmd", displayPlugin->isHmd() ? "1" : "0");1365 setCrashAnnotation("hmd", displayPlugin->isHmd() ? "1" : "0");
1353 });1366 });