mirror of
https://github.com/overte-org/overte.git
synced 2025-04-08 05:52:38 +02:00
set size of GVRMainWindow to note 4 size
This commit is contained in:
parent
c6b7353a17
commit
fa166f012f
4 changed files with 25 additions and 5 deletions
|
@ -9,8 +9,13 @@
|
|||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
//
|
||||
|
||||
#ifdef Q_OS_ANDROID
|
||||
|
||||
#include <QtAndroidExtras/QAndroidJniEnvironment>
|
||||
#include <QtAndroidExtras/QAndroidJniObject>
|
||||
|
||||
#endif
|
||||
|
||||
#include <QtCore/QTimer>
|
||||
#include <qpa/qplatformnativeinterface.h>
|
||||
#include <QtWidgets/QMenuBar>
|
||||
|
@ -37,7 +42,7 @@ GVRInterface::GVRInterface(int argc, char* argv[]) :
|
|||
|
||||
connect(this, &QGuiApplication::applicationStateChanged, this, &GVRInterface::handleApplicationStateChange);
|
||||
|
||||
#ifdef Q_OS_ANDROID && HAVE_LIBOVR
|
||||
#if defined(Q_OS_ANDROID) && defined(HAVE_LIBOVR)
|
||||
QAndroidJniEnvironment jniEnv;
|
||||
|
||||
QPlatformNativeInterface* interface = QApplication::platformNativeInterface();
|
||||
|
@ -54,7 +59,7 @@ GVRInterface::GVRInterface(int argc, char* argv[]) :
|
|||
}
|
||||
|
||||
void GVRInterface::idle() {
|
||||
#ifdef Q_OS_ANDROID && HAVE_LIBOVR
|
||||
#if defined(Q_OS_ANDROID) && defined(HAVE_LIBOVR)
|
||||
if (!_inVRMode && ovr_IsHeadsetDocked()) {
|
||||
qDebug() << "The headset just got docked - assume we are in VR mode.";
|
||||
_inVRMode = true;
|
||||
|
|
|
@ -14,6 +14,10 @@
|
|||
#include <QtWidgets/QInputDialog>
|
||||
#include <QtWidgets/QMenuBar>
|
||||
|
||||
#ifndef Q_OS_ANDROID
|
||||
#include <QtWidgets/QDesktopWidget>
|
||||
#endif
|
||||
|
||||
#include <AddressManager.h>
|
||||
|
||||
#include "InterfaceView.h"
|
||||
|
@ -24,6 +28,13 @@
|
|||
GVRMainWindow::GVRMainWindow(QWidget* parent) :
|
||||
QMainWindow(parent)
|
||||
{
|
||||
|
||||
#ifndef Q_OS_ANDROID
|
||||
const int NOTE_4_WIDTH = 2560;
|
||||
const int NOTE_4_HEIGHT = 1440;
|
||||
setFixedSize(NOTE_4_WIDTH / 2, NOTE_4_HEIGHT / 2);
|
||||
#endif
|
||||
|
||||
QMenu* fileMenu = new QMenu("File");
|
||||
QMenu* helpMenu = new QMenu("Help");
|
||||
|
||||
|
|
|
@ -183,12 +183,10 @@ add_definitions(-DQT_NO_BEARERMANAGEMENT)
|
|||
|
||||
if (APPLE)
|
||||
# link in required OS X frameworks and include the right GL headers
|
||||
find_library(CoreAudio CoreAudio)
|
||||
find_library(CoreFoundation CoreFoundation)
|
||||
find_library(OpenGL OpenGL)
|
||||
find_library(AppKit AppKit)
|
||||
|
||||
target_link_libraries(${TARGET_NAME} ${CoreAudio} ${CoreFoundation} ${OpenGL} ${AppKit})
|
||||
target_link_libraries(${TARGET_NAME} ${OpenGL} ${AppKit})
|
||||
|
||||
# install command for OS X bundle
|
||||
INSTALL(TARGETS ${TARGET_NAME}
|
||||
|
|
|
@ -25,5 +25,11 @@ find_package(Soxr REQUIRED)
|
|||
target_link_libraries(${TARGET_NAME} ${SOXR_LIBRARIES})
|
||||
include_directories(SYSTEM ${SOXR_INCLUDE_DIRS})
|
||||
|
||||
if (APPLE)
|
||||
find_library(CoreAudio CoreAudio)
|
||||
find_library(CoreFoundation CoreFoundation)
|
||||
target_link_libraries(${TARGET_NAME} ${CoreAudio} ${CoreFoundation})
|
||||
endif ()
|
||||
|
||||
# call macro to include our dependency includes and bubble them up via a property on our target
|
||||
include_dependency_includes()
|
Loading…
Reference in a new issue