From 8565573b5110f4cb0b87a53297b2ef86ecf89901 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Thu, 6 Aug 2026 11:42:19 +0200 Subject: [PATCH] Buildfixes for Mac/Windows --- CMakeLists.txt | 2 ++ SDL/SDLUtil.cpp | 6 ++++++ headless/Headless.vcxproj | 25 ++++++++++++++++++++++++- headless/Headless.vcxproj.filters | 6 ++++++ headless/WindowsHeadlessHost.cpp | 2 +- headless/WindowsHeadlessHost.h | 2 +- 6 files changed, 40 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2fff8ce231..b91acbe094 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1344,6 +1344,8 @@ if(HEADLESS) list(APPEND HeadlessSource Common/Render/Text/draw_text_cocoa.mm Common/Render/Text/draw_text_cocoa.h + SDL/SDLCocoaMetalLayer.h + SDL/SDLCocoaMetalLayer.mm ) set_source_files_properties(Common/Render/Text/draw_text_cocoa.mm PROPERTIES COMPILE_FLAGS -fobjc-arc) diff --git a/SDL/SDLUtil.cpp b/SDL/SDLUtil.cpp index 4131dd1753..d363f0790b 100644 --- a/SDL/SDLUtil.cpp +++ b/SDL/SDLUtil.cpp @@ -1,5 +1,11 @@ #include +#include "ppsspp_config.h" + +#if PPSSPP_PLATFORM(MAC) || PPSSPP_PLATFORM(IOS) +#include "SDL/SDLCocoaMetalLayer.h" +#endif + #include "Common/GPU/MiscTypes.h" #include "Common/GPU/Vulkan/VulkanLoader.h" #include "Common/GPU/Vulkan/VulkanContext.h" diff --git a/headless/Headless.vcxproj b/headless/Headless.vcxproj index 5c242f2e47..4b5c3c192b 100644 --- a/headless/Headless.vcxproj +++ b/headless/Headless.vcxproj @@ -338,6 +338,14 @@ true true + + true + true + true + true + true + true + @@ -399,8 +407,23 @@ + + true + true + true + true + true + true + - + + true + true + true + true + true + true + diff --git a/headless/Headless.vcxproj.filters b/headless/Headless.vcxproj.filters index fab3a363c6..473d7eb70b 100644 --- a/headless/Headless.vcxproj.filters +++ b/headless/Headless.vcxproj.filters @@ -25,6 +25,9 @@ Windows + + Other Platforms + @@ -41,6 +44,9 @@ Windows + + Other Platforms + diff --git a/headless/WindowsHeadlessHost.cpp b/headless/WindowsHeadlessHost.cpp index 23bdc8c823..43ef4cb803 100644 --- a/headless/WindowsHeadlessHost.cpp +++ b/headless/WindowsHeadlessHost.cpp @@ -23,7 +23,7 @@ const bool WINDOW_VISIBLE = false; -WindowDesc *CreateHiddenWindow(int w, int h, GPUBackend backend, WindowDesc *desc) { +void *CreateHiddenWindow(int w, int h, GPUBackend backend, WindowDesc *desc) { static WNDCLASSEX wndClass = { sizeof(WNDCLASSEX), CS_HREDRAW | CS_VREDRAW | CS_OWNDC, diff --git a/headless/WindowsHeadlessHost.h b/headless/WindowsHeadlessHost.h index 6d5617ae66..37b2bda757 100644 --- a/headless/WindowsHeadlessHost.h +++ b/headless/WindowsHeadlessHost.h @@ -23,4 +23,4 @@ struct WindowDesc; // Same API as for SDL void *CreateHiddenWindow(int w, int h, GPUBackend backend, WindowDesc *desc); -void DestroyHiddenWindow(WindowDesc window); +void DestroyHiddenWindow(void *window, WindowDesc desc);