mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 12:04:18 +02:00
Oculus mouse pointer fix.
This commit is contained in:
parent
a557dc3ae2
commit
600b05fcc9
2 changed files with 7 additions and 8 deletions
|
@ -1469,7 +1469,6 @@ void Application::checkBandwidthMeterClick() {
|
|||
void Application::setFullscreen(bool fullscreen) {
|
||||
_window->setWindowState(fullscreen ? (_window->windowState() | Qt::WindowFullScreen) :
|
||||
(_window->windowState() & ~Qt::WindowFullScreen));
|
||||
updateCursor();
|
||||
}
|
||||
|
||||
void Application::setRenderVoxels(bool voxelRender) {
|
||||
|
@ -2391,6 +2390,13 @@ void Application::updateCursor(float deltaTime) {
|
|||
bool showWarnings = Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings);
|
||||
PerformanceWarning warn(showWarnings, "Application::updateCursor()");
|
||||
|
||||
// in fullscreen Oculus mode, always hide cursor
|
||||
if (OculusManager::isConnected() && _window->windowState().testFlag(Qt::WindowFullScreen)) {
|
||||
getGLWidget()->setCursor(Qt::BlankCursor);
|
||||
_mouseHidden = true;
|
||||
return;
|
||||
}
|
||||
|
||||
// watch mouse position, if it hasn't moved, hide the cursor
|
||||
bool underMouse = _glWidget->underMouse();
|
||||
if (!_mouseHidden) {
|
||||
|
@ -4090,11 +4096,6 @@ void Application::setMenuShortcutsEnabled(bool enabled) {
|
|||
setShortcutsEnabled(_window->menuBar(), enabled);
|
||||
}
|
||||
|
||||
void Application::updateCursor() {
|
||||
_glWidget->setCursor(OculusManager::isConnected() && _window->windowState().testFlag(Qt::WindowFullScreen) ?
|
||||
Qt::BlankCursor : Qt::ArrowCursor);
|
||||
}
|
||||
|
||||
void Application::attachNewHeadToNode(Node* newNode) {
|
||||
if (newNode->getLinkedData() == NULL) {
|
||||
newNode->setLinkedData(new Avatar(newNode));
|
||||
|
|
|
@ -288,8 +288,6 @@ private:
|
|||
|
||||
void setMenuShortcutsEnabled(bool enabled);
|
||||
|
||||
void updateCursor();
|
||||
|
||||
static void attachNewHeadToNode(Node *newNode);
|
||||
static void* networkReceive(void* args); // network receive thread
|
||||
|
||||
|
|
Loading…
Reference in a new issue