mirror of
https://github.com/overte-org/overte.git
synced 2025-04-19 16:23:39 +02:00
Hide cusor in VR mode
This commit is contained in:
parent
1bb08ef30f
commit
d89d10d263
1 changed files with 14 additions and 1 deletions
|
@ -2342,7 +2342,20 @@ void Application::update(float deltaTime) {
|
|||
_prioVR.update(deltaTime);
|
||||
|
||||
}
|
||||
|
||||
|
||||
static QCursor cursor;
|
||||
if (OculusManager::isConnected() &&
|
||||
Menu::getInstance()->isOptionChecked(MenuOption::EnableVRMode)){
|
||||
if (_window->cursor().shape() != Qt::BlankCursor) {
|
||||
qDebug() << "Hiding cursor" << _window->cursor().shape();
|
||||
cursor = _window->cursor();
|
||||
_window->setCursor(QCursor(Qt::BlankCursor));
|
||||
}
|
||||
} else if(_window->cursor().shape() == Qt::BlankCursor) {
|
||||
qDebug() << "Showing cursor" << _window->cursor().shape();
|
||||
_window->setCursor(cursor);
|
||||
}
|
||||
|
||||
// Dispatch input events
|
||||
_controllerScriptingInterface.updateInputControllers();
|
||||
|
||||
|
|
Loading…
Reference in a new issue