simplified way to switch to system cursor if non hmd mode

This commit is contained in:
amer cerkic 2019-04-30 11:49:33 -07:00
parent 978108b3ba
commit df3049cb44

View file

@ -3591,7 +3591,14 @@ void Application::setPreferAvatarFingerOverStylus(bool value) {
void Application::setPreferredCursor(const QString& cursorName) {
qCDebug(interfaceapp) << "setPreferredCursor" << cursorName;
_preferredCursor.set(cursorName.isEmpty() ? Cursor::Manager::getIconName(Cursor::Icon::SYSTEM) : cursorName);
if (_displayPlugin && _displayPlugin->isHmd()) {
_preferredCursor.set(cursorName.isEmpty() ? DEFAULT_CURSOR_NAME : cursorName);
}
else {
_preferredCursor.set(cursorName.isEmpty() ? Cursor::Manager::getIconName(Cursor::Icon::SYSTEM) : cursorName);
}
showCursor(Cursor::Manager::lookupIcon(_preferredCursor.get()));
}