From 625a8335b5273399d57361c0bf81d142b27979b0 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Wed, 27 Aug 2025 22:28:51 +0200 Subject: [PATCH] Don't compile helper function when building without audio/video/joystick support --- src/SDL.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/SDL.c b/src/SDL.c index 9b5ee8713f..2075b3a18e 100644 --- a/src/SDL.c +++ b/src/SDL.c @@ -237,6 +237,7 @@ static bool SDL_ShouldQuitSubsystem(Uint32 subsystem) return (((subsystem_index >= 0) && (SDL_SubsystemRefCount[subsystem_index] == 1)) || SDL_bInMainQuit); } +#if !defined(SDL_VIDEO_DISABLED) || !defined(SDL_AUDIO_DISABLED) || !defined(SDL_JOYSTICK_DISABLED) /* Private helper to either increment's existing ref counter, * or fully init a new subsystem. */ static bool SDL_InitOrIncrementSubsystem(Uint32 subsystem) @@ -252,6 +253,7 @@ static bool SDL_InitOrIncrementSubsystem(Uint32 subsystem) } return SDL_InitSubSystem(subsystem); } +#endif // !SDL_VIDEO_DISABLED || !SDL_AUDIO_DISABLED || !SDL_JOYSTICK_DISABLED void SDL_SetMainReady(void) {