mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-25 17:14:59 +02:00
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.
This commit is contained in:
parent
df34e2f86d
commit
75beb95a97
1 changed files with 14 additions and 1 deletions
|
@ -1345,9 +1345,22 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo
|
|||
connect(this, &QCoreApplication::aboutToQuit, addressManager.data(), &AddressManager::storeCurrentAddress);
|
||||
|
||||
connect(this, &Application::activeDisplayPluginChanged, this, &Application::updateThreadPoolCount);
|
||||
connect(this, &Application::activeDisplayPluginChanged, this, [](){
|
||||
connect(this, &Application::activeDisplayPluginChanged, this, [=](){
|
||||
qApp->setProperty(hifi::properties::HMD, qApp->isHMDMode());
|
||||
auto displayPlugin = qApp->getActiveDisplayPlugin();
|
||||
|
||||
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");
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue