From 8a9b25f2900028ae492844ac088fef419bbfd169 Mon Sep 17 00:00:00 2001 From: scawful Date: Wed, 31 Jul 2024 11:29:02 -0400 Subject: [PATCH] set target conditionals for apple targets --- src/app/core/controller.cc | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/app/core/controller.cc b/src/app/core/controller.cc index a7e2fdf7..624cbf85 100644 --- a/src/app/core/controller.cc +++ b/src/app/core/controller.cc @@ -1,11 +1,23 @@ #include "controller.h" #include + #include "imgui/backends/imgui_impl_sdl2.h" #include "imgui/backends/imgui_impl_sdlrenderer2.h" #include "imgui/imgui.h" #include "imgui/imgui_internal.h" +#if defined(__APPLE__) && defined(__MACH__) +#include +#if TARGET_IPHONE_SIMULATOR == 1 +#include "imgui/backends/imgui_impl_metal.h" +#elif TARGET_OS_IPHONE == 1 +#include "imgui/backends/imgui_impl_metal.h" +#elif TARGET_OS_MAC == 1 + +#endif +#endif + #include #include "absl/status/status.h" @@ -280,7 +292,7 @@ absl::Status Controller::OnEntry(std::string filename) { platform_ = Platform::kLinux; #else platform_ = Platform::kUnknown; -#endif +#endif RETURN_IF_ERROR(CreateSDL_Window()) RETURN_IF_ERROR(CreateRenderer()) @@ -541,4 +553,4 @@ absl::Status Controller::LoadAudioDevice() { } // namespace core } // namespace app -} // namespace yaze \ No newline at end of file +} // namespace yaze