Misc: Build fixes for Android
This commit is contained in:
@ -140,10 +140,7 @@ if(ENABLE_OPENGL)
|
||||
)
|
||||
endif()
|
||||
if(ANDROID)
|
||||
target_sources(util PRIVATE
|
||||
gl/context_egl_android.cpp
|
||||
gl/context_egl_android.h
|
||||
)
|
||||
target_include_directories(util PRIVATE "${CMAKE_SOURCE_DIR}/android/app/src/cpp")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
@ -18,6 +18,8 @@
|
||||
#include "context_wgl.h"
|
||||
#elif defined(__APPLE__)
|
||||
#include "context_agl.h"
|
||||
#elif defined(__ANDROID__)
|
||||
#include "context_egl_android.h"
|
||||
#else
|
||||
#ifdef ENABLE_EGL
|
||||
#ifdef ENABLE_WAYLAND
|
||||
@ -120,6 +122,8 @@ std::unique_ptr<GL::Context> Context::Create(const WindowInfo& wi, const Version
|
||||
context = ContextWGL::Create(wi, versions_to_try, num_versions_to_try);
|
||||
#elif defined(__APPLE__)
|
||||
context = ContextAGL::Create(wi, versions_to_try, num_versions_to_try);
|
||||
#elif defined(__ANDROID__)
|
||||
context = ContextEGLAndroid::Create(wi, versions_to_try, num_versions_to_try);
|
||||
#else
|
||||
#if defined(ENABLE_X11)
|
||||
if (wi.type == WindowInfo::Type::X11)
|
||||
|
||||
@ -1604,6 +1604,8 @@ void InputManager::ReloadBindings(SettingsInterface& si, SettingsInterface& bind
|
||||
s_pad_vibration_array.clear();
|
||||
s_pointer_move_callbacks.clear();
|
||||
|
||||
Host::AddFixedInputBindings(binding_si);
|
||||
|
||||
// Hotkeys use the base configuration, except if the custom hotkeys option is enabled.
|
||||
const bool use_profile_hotkeys = si.GetBoolValue("ControllerPorts", "UseProfileHotkeyBindings", false);
|
||||
AddHotkeyBindings(use_profile_hotkeys ? binding_si : si);
|
||||
|
||||
@ -351,6 +351,9 @@ void OnInputDeviceDisconnected(const std::string_view& identifier);
|
||||
} // namespace InputManager
|
||||
|
||||
namespace Host {
|
||||
/// Adds any fixed bindings from the host.
|
||||
void AddFixedInputBindings(SettingsInterface& si);
|
||||
|
||||
/// Called when a new input device is connected.
|
||||
void OnInputDeviceConnected(const std::string_view& identifier, const std::string_view& device_name);
|
||||
|
||||
|
||||
@ -220,6 +220,10 @@ bool VulkanDevice::SelectInstanceExtensions(ExtensionList* extension_list, const
|
||||
if (wi.type == WindowInfo::Type::MacOS && !SupportsExtension(VK_EXT_METAL_SURFACE_EXTENSION_NAME, true))
|
||||
return false;
|
||||
#endif
|
||||
#if defined(VK_USE_PLATFORM_ANDROID_KHR)
|
||||
if (wi.type == WindowInfo::Type::Android && !SupportsExtension(VK_KHR_ANDROID_SURFACE_EXTENSION_NAME, true))
|
||||
return false;
|
||||
#endif
|
||||
|
||||
// VK_EXT_debug_utils
|
||||
if (enable_debug_utils && !SupportsExtension(VK_EXT_DEBUG_UTILS_EXTENSION_NAME, false))
|
||||
|
||||
@ -56,6 +56,10 @@ VULKAN_INSTANCE_ENTRY_POINT(vkCreateWaylandSurfaceKHR, false)
|
||||
VULKAN_INSTANCE_ENTRY_POINT(vkCreateMetalSurfaceEXT, false)
|
||||
#endif
|
||||
|
||||
#if defined(VK_USE_PLATFORM_ANDROID_KHR)
|
||||
VULKAN_INSTANCE_ENTRY_POINT(vkCreateAndroidSurfaceKHR, false)
|
||||
#endif
|
||||
|
||||
// VK_EXT_debug_utils
|
||||
VULKAN_INSTANCE_ENTRY_POINT(vkCmdBeginDebugUtilsLabelEXT, false)
|
||||
VULKAN_INSTANCE_ENTRY_POINT(vkCmdEndDebugUtilsLabelEXT, false)
|
||||
|
||||
Reference in New Issue
Block a user