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
13451345 connect(this, &QCoreApplication::aboutToQuit, addressManager.data(), &AddressManager::storeCurrentAddress);
13461346
13471347 connect(this, &Application::activeDisplayPluginChanged, this, &Application::updateThreadPoolCount);
1348− connect(this, &Application::activeDisplayPluginChanged, this, [](){
1348+ connect(this, &Application::activeDisplayPluginChanged, this, [=](){
13491349 qApp->setProperty(hifi::properties::HMD, qApp->isHMDMode());
13501350 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+
13511364 setCrashAnnotation("display_plugin", displayPlugin->getName().toStdString());
13521365 setCrashAnnotation("hmd", displayPlugin->isHmd() ? "1" : "0");
13531366 });