diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index e58f79cb5e..0740e424a1 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -108,7 +108,7 @@ static unsigned STARFIELD_SEED = 1; static const int BANDWIDTH_METER_CLICK_MAX_DRAG_LENGTH = 6; // farther dragged clicks are ignored -const unsigned MAXIMUM_CACHE_SIZE = 10737418240; // 10GB +const qint64 MAXIMUM_CACHE_SIZE = 10737418240L; // 10GB static QTimer* idleTimer = NULL; @@ -724,11 +724,11 @@ void Application::paintGL() { displaySide(*whichCamera); glPopMatrix(); - if (Menu::getInstance()->isOptionChecked(MenuOption::Mirror)) { - renderRearViewMirror(_mirrorViewRect); - - } else if (Menu::getInstance()->isOptionChecked(MenuOption::FullscreenMirror)) { + if (Menu::getInstance()->isOptionChecked(MenuOption::FullscreenMirror)) { _rearMirrorTools->render(true); + + } else if (Menu::getInstance()->isOptionChecked(MenuOption::Mirror)) { + renderRearViewMirror(_mirrorViewRect); } _glowEffect.render(); @@ -4314,8 +4314,6 @@ bool Application::isVSyncOn() const { if (wglewGetExtension("WGL_EXT_swap_control")) { int swapInterval = wglGetSwapIntervalEXT(); return (swapInterval > 0); - } else { - return true; } #elif defined(Q_OS_LINUX) // TODO: write the poper code for linux @@ -4326,10 +4324,9 @@ bool Application::isVSyncOn() const { } else { return true; } - */ -#else - return true; + */ #endif + return true; } bool Application::isVSyncEditable() const { @@ -4344,7 +4341,6 @@ bool Application::isVSyncEditable() const { return true; } */ -#else #endif return false; } diff --git a/interface/src/ui/RearMirrorTools.cpp b/interface/src/ui/RearMirrorTools.cpp index f4b0bb82b5..8423a9c432 100644 --- a/interface/src/ui/RearMirrorTools.cpp +++ b/interface/src/ui/RearMirrorTools.cpp @@ -40,7 +40,7 @@ RearMirrorTools::RearMirrorTools(QGLWidget* parent, QRect& bounds, QSettings* se _zoomHeadTextureId = _parent->bindTexture(QImage(Application::resourcesPath() + "images/plus.svg")); _zoomBodyTextureId = _parent->bindTexture(QImage(Application::resourcesPath() + "images/minus.svg")); - _shrinkIconRect = QRect(ICON_PADDING, ICON_PADDING, ICON_SIZE, ICON_SIZE); + _shrinkIconRect = QRect(ICON_PADDING, ICON_SIZE + ICON_PADDING, ICON_SIZE, ICON_SIZE); _closeIconRect = QRect(_bounds.left() + ICON_PADDING, _bounds.top() + ICON_PADDING, ICON_SIZE, ICON_SIZE); _resetIconRect = QRect(_bounds.width() - ICON_SIZE - ICON_PADDING, _bounds.top() + ICON_PADDING, ICON_SIZE, ICON_SIZE); _bodyZoomIconRect = QRect(_bounds.width() - ICON_SIZE - ICON_PADDING, _bounds.bottom() - ICON_PADDING - ICON_SIZE, ICON_SIZE, ICON_SIZE); @@ -106,7 +106,7 @@ bool RearMirrorTools::mousePressEvent(int x, int y) { } if (_fullScreen) { - if (_shrinkIconRect.contains(x, y)) { + if (_shrinkIconRect.contains(x, 2 * _shrinkIconRect.top() - y)) { _fullScreen = false; emit shrinkView(); return true; @@ -156,6 +156,9 @@ void RearMirrorTools::displayIcon(QRect bounds, QRect iconBounds, GLuint texture } glEnd(); glPopMatrix(); + + glMatrixMode(GL_MODELVIEW); + glBindTexture(GL_TEXTURE_2D, 0); glDisable(GL_TEXTURE_2D); }