mirror of
https://github.com/AleziaKurdis/overte.git
synced 2025-04-07 10:52:37 +02:00
Add per-android-app preprocessor macros
This commit is contained in:
parent
a5f84ab51a
commit
4409e59682
2 changed files with 16 additions and 9 deletions
|
@ -100,6 +100,13 @@ if (ANDROID)
|
|||
add_definitions(-DCUSTOM_DISPLAY_PLUGINS)
|
||||
set(PLATFORM_PLUGIN_LIBRARIES oculusMobile oculusMobilePlugin)
|
||||
endif()
|
||||
|
||||
# Allow client code to use preprocessor macros to distinguish between quest and non-quest builds
|
||||
if (${HIFI_ANDROID_APP} STREQUAL "questInterface")
|
||||
add_definitions(-DANDROID_APP_QUEST_INTERFACE)
|
||||
elseif(${HIFI_ANDROID_APP} STREQUAL "interface")
|
||||
add_definitions(-DANDROID_APP_INTERFACE)
|
||||
endif()
|
||||
else ()
|
||||
set(PLATFORM_QT_COMPONENTS WebEngine Xml)
|
||||
endif ()
|
||||
|
@ -128,7 +135,7 @@ set(PLATFORM_QT_GL OpenGL)
|
|||
|
||||
if (USE_GLES)
|
||||
add_definitions(-DUSE_GLES)
|
||||
add_definitions(-DGPU_POINTER_STORAGE_SHARED)
|
||||
add_definitions(-DGPU_POINTER_STORAGE_sRED)
|
||||
set(PLATFORM_GL_BACKEND gpu-gl-common gpu-gles)
|
||||
else()
|
||||
add_definitions(-DGPU_POINTER_STORAGE_RAW)
|
||||
|
|
|
@ -3106,12 +3106,12 @@ void Application::initializeUi() {
|
|||
}
|
||||
if (TouchscreenVirtualPadDevice::NAME == inputPlugin->getName()) {
|
||||
_touchscreenVirtualPadDevice = std::dynamic_pointer_cast<TouchscreenVirtualPadDevice>(inputPlugin);
|
||||
#if defined(Q_OS_ANDROID)
|
||||
// auto& virtualPadManager = VirtualPad::Manager::instance();
|
||||
// connect(&virtualPadManager, &VirtualPad::Manager::hapticFeedbackRequested,
|
||||
// this, [](int duration) {
|
||||
// AndroidHelper::instance().performHapticFeedback(duration);
|
||||
// });
|
||||
#if defined(ANDROID_APP_INTERFACE)
|
||||
auto& virtualPadManager = VirtualPad::Manager::instance();
|
||||
connect(&virtualPadManager, &VirtualPad::Manager::hapticFeedbackRequested,
|
||||
this, [](int duration) {
|
||||
AndroidHelper::instance().performHapticFeedback(duration);
|
||||
});
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
@ -3638,7 +3638,7 @@ void Application::handleSandboxStatus(QNetworkReply* reply) {
|
|||
}
|
||||
|
||||
// Get controller availability
|
||||
#ifdef Q_OS_ANDROID
|
||||
#ifdef ANDROID_APP_QUEST_INTERFACE
|
||||
bool hasHandControllers = true;
|
||||
#else
|
||||
bool hasHandControllers = false;
|
||||
|
@ -8260,7 +8260,7 @@ void Application::loadDomainConnectionDialog() {
|
|||
}
|
||||
|
||||
void Application::toggleLogDialog() {
|
||||
#ifndef Q_OS_ANDROID
|
||||
#ifndef ANDROID_APP_QUEST_INTERFACE
|
||||
if (getLoginDialogPoppedUp()) {
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue