Fix android build

This commit is contained in:
SSimco
2023-06-10 13:45:15 +03:00
parent 05f3444207
commit a03ce9a746
3 changed files with 117 additions and 3 deletions
@@ -1285,7 +1285,7 @@ VkSurfaceKHR VulkanRenderer::CreateAndroidSurface(VkInstance instance, ANativeWi
VkResult err;
if ((err = vkCreateAndroidSurfaceKHR(instance, &sci, nullptr, &result)) != VK_SUCCESS)
{
forceLog_printf("Cannot create an Android Vulkan surface: %d", (sint32)err);
cemuLog_log(LogType::Force, "Cannot create an Android Vulkan surface: {}", (sint32)err);
throw std::runtime_error(fmt::format("Cannot create an Android Vulkan surface: {}", err));
}
@@ -1358,6 +1358,7 @@ VkSurfaceKHR VulkanRenderer::CreateFramebufferSurface(VkInstance instance, struc
return CreateWinSurface(instance, windowInfo.hwnd);
#elif BOOST_OS_LINUX
#if __ANDROID__
return CreateAndroidSurface(instance, static_cast<ANativeWindow *>(windowInfo.handle));
#else
if(windowInfo.backend == WindowHandleInfo::Backend::X11)
return CreateXlibSurface(instance, windowInfo.xlib_display, windowInfo.xlib_window);
+2 -2
View File
@@ -16,13 +16,13 @@ if (CMAKE_SYSTEM_PROCESSOR MATCHES "(x86)|(X86)|(amd64)|(AMD64)")
set_property(TARGET CemuAsm PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
elseif(ANDROID)
set(CMAKE_ASM_NASM_COMPILE_OBJECT "<CMAKE_ASM_NASM_COMPILER> -g dwarf2 -f elf64 -o <OBJECT> <SOURCE>")
else()
# NASM
if (APPLE)
set(CMAKE_ASM_NASM_COMPILE_OBJECT "<CMAKE_ASM_NASM_COMPILER> -g -Fdwarf -f macho64 --prefix _ -o <OBJECT> <SOURCE>")
elseif(ANDROID)
set(CMAKE_ASM_NASM_COMPILE_OBJECT "<CMAKE_ASM_NASM_COMPILER> -g dwarf2 -f elf64 -o <OBJECT> <SOURCE>")
else()
set(CMAKE_ASM_NASM_COMPILE_OBJECT "<CMAKE_ASM_NASM_COMPILER> -g -Fdwarf -f elf64 -o <OBJECT> <SOURCE>")
endif()
+113
View File
@@ -0,0 +1,113 @@
#include "gui/guiWrapper.h"
bool g_inputConfigWindowHasFocus;
WindowInfo g_window_info;
void gui_loggingWindowLog(std::string_view filter, std::string_view message)
{
}
void gui_loggingWindowLog(std::string_view message)
{
}
void gui_create()
{
}
WindowInfo& gui_getWindowInfo()
{
return g_window_info;
}
void gui_updateWindowTitles(bool isIdle, bool isLoading, double fps)
{
}
void gui_getWindowSize(int& w, int& h)
{
}
void gui_getPadWindowSize(int& w, int& h)
{
}
void gui_getWindowPhysSize(int& w, int& h)
{
}
void gui_getPadWindowPhysSize(int& w, int& h)
{
}
double gui_getWindowDPIScale()
{
}
double gui_getPadDPIScale()
{
}
bool gui_isPadWindowOpen()
{
}
bool gui_isKeyDown(uint32 key)
{
return false;
}
bool gui_isKeyDown(PlatformKeyCodes key)
{
return false;
}
void gui_notifyGameLoaded()
{
}
void gui_notifyGameExited()
{
}
bool gui_isFullScreen()
{
return false;
}
void gui_initHandleContextFromWxWidgetsWindow(WindowHandleInfo& handleInfoOut, class wxWindow* wxw)
{
}
void gui_requestGameListRefresh()
{
}
std::string gui_RawKeyCodeToString(uint32 keyCode)
{
}
bool gui_saveScreenshotToFile(const fs::path& imagePath, std::vector<uint8>& data, int width, int height)
{
}
bool gui_saveScreenshotToClipboard(std::vector<uint8>& data, int width, int height)
{
}
/*
* Returns true if a screenshot request is queued
* Once this function has returned true, it will reset back to
* false until the next time a screenshot is requested
*/
bool gui_hasScreenshotRequest()
{
}
// debugger stuff
void debuggerWindow_updateViewThreadsafe2()
{
}
void debuggerWindow_notifyDebugBreakpointHit2()
{
}
void debuggerWindow_notifyRun()
{
}
void debuggerWindow_moveIP()
{
}
void debuggerWindow_notifyModuleLoaded(void* module)
{
}
void debuggerWindow_notifyModuleUnloaded(void* module)
{
}