mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 20:23:06 +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) {
|
void Application::setFullscreen(bool fullscreen) {
|
||||||
_window->setWindowState(fullscreen ? (_window->windowState() | Qt::WindowFullScreen) :
|
_window->setWindowState(fullscreen ? (_window->windowState() | Qt::WindowFullScreen) :
|
||||||
(_window->windowState() & ~Qt::WindowFullScreen));
|
(_window->windowState() & ~Qt::WindowFullScreen));
|
||||||
updateCursor();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Application::setRenderVoxels(bool voxelRender) {
|
void Application::setRenderVoxels(bool voxelRender) {
|
||||||
|
@ -2391,6 +2390,13 @@ void Application::updateCursor(float deltaTime) {
|
||||||
bool showWarnings = Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings);
|
bool showWarnings = Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings);
|
||||||
PerformanceWarning warn(showWarnings, "Application::updateCursor()");
|
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
|
// watch mouse position, if it hasn't moved, hide the cursor
|
||||||
bool underMouse = _glWidget->underMouse();
|
bool underMouse = _glWidget->underMouse();
|
||||||
if (!_mouseHidden) {
|
if (!_mouseHidden) {
|
||||||
|
@ -4090,11 +4096,6 @@ void Application::setMenuShortcutsEnabled(bool enabled) {
|
||||||
setShortcutsEnabled(_window->menuBar(), 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) {
|
void Application::attachNewHeadToNode(Node* newNode) {
|
||||||
if (newNode->getLinkedData() == NULL) {
|
if (newNode->getLinkedData() == NULL) {
|
||||||
newNode->setLinkedData(new Avatar(newNode));
|
newNode->setLinkedData(new Avatar(newNode));
|
||||||
|
|
|
@ -288,8 +288,6 @@ private:
|
||||||
|
|
||||||
void setMenuShortcutsEnabled(bool enabled);
|
void setMenuShortcutsEnabled(bool enabled);
|
||||||
|
|
||||||
void updateCursor();
|
|
||||||
|
|
||||||
static void attachNewHeadToNode(Node *newNode);
|
static void attachNewHeadToNode(Node *newNode);
|
||||||
static void* networkReceive(void* args); // network receive thread
|
static void* networkReceive(void* args); // network receive thread
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue