found a more simplified way to stop rendering the mouse unless its the Reticle cursor

This commit is contained in:
amer cerkic 2019-04-30 11:34:11 -07:00
parent 7d2b75673c
commit 978108b3ba
2 changed files with 3 additions and 6 deletions

View file

@ -3591,7 +3591,7 @@ void Application::setPreferAvatarFingerOverStylus(bool value) {
void Application::setPreferredCursor(const QString& cursorName) {
qCDebug(interfaceapp) << "setPreferredCursor" << cursorName;
_preferredCursor.set(cursorName.isEmpty() ? DEFAULT_CURSOR_NAME : cursorName);
_preferredCursor.set(cursorName.isEmpty() ? Cursor::Manager::getIconName(Cursor::Icon::SYSTEM) : cursorName);
showCursor(Cursor::Manager::lookupIcon(_preferredCursor.get()));
}
@ -5041,11 +5041,8 @@ void Application::idle() {
}
}
#endif
if((displayPlugin && displayPlugin->isHmd()) || _preferredCursor.get() == Cursor::Manager::ICON_NAMES[Cursor::Icon::RETICLE]){
checkChangeCursor();
}
checkChangeCursor();
#if !defined(DISABLE_QML)
auto stats = Stats::getInstance();

View file

@ -683,7 +683,7 @@ void OpenGLDisplayPlugin::compositeLayers() {
}
auto& cursorManager = Cursor::Manager::instance();
if (isHmd() || cursorManager.getCursor()->getIcon() == Cursor::RETICLE ) {
if (isHmd() || cursorManager.getCursor()->getIcon() == Cursor::RETICLE) {
auto compositorHelper = DependencyManager::get<CompositorHelper>();
// Draw the pointer last so it's on top of everything
if (compositorHelper->getReticleVisible()) {