Misc: Build fixes for Android

This commit is contained in:
Stenzek
2023-11-01 01:32:29 +10:00
parent 538266aacd
commit f05ff4103e
27 changed files with 197 additions and 184 deletions

View File

@ -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()

View File

@ -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)

View File

@ -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);

View File

@ -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);

View File

@ -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))

View File

@ -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)