From bc170bfd6130cfa4b61ff7a2eec218f2724734ed Mon Sep 17 00:00:00 2001 From: luboslenco Date: Sun, 3 Aug 2025 20:42:36 +0200 Subject: [PATCH] Fix compile --- base/sources/backends/macos_system.m | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/base/sources/backends/macos_system.m b/base/sources/backends/macos_system.m index e388ce70..69387345 100644 --- a/base/sources/backends/macos_system.m +++ b/base/sources/backends/macos_system.m @@ -26,8 +26,10 @@ static const char *videoFormats[] = {"ogv", NULL}; static NSApplication *myapp; static NSWindow *window; static BasicMTKView *view; -static struct HIDManager *hidManager; static char language[3]; +#ifdef WITH_GAMEPAD +static struct HIDManager *hidManager; +#endif @implementation BasicMTKView @@ -987,10 +989,12 @@ void iron_init(const char *name, int width, int height, iron_window_options_t *w [myapp finishLaunching]; [[NSRunningApplication currentApplication] activateWithOptions:(NSApplicationActivateAllWindows | NSApplicationActivateIgnoringOtherApps)]; NSApp.activationPolicy = NSApplicationActivationPolicyRegular; + add_menubar(); + #ifdef WITH_GAMEPAD hidManager = (struct HIDManager *)malloc(sizeof(struct HIDManager)); HIDManager_init(hidManager); - add_menubar(); + #endif } iron_window_options_t defaultWindowOptions;