diff --git a/src/SDL.c b/src/SDL.c index a784810d51..d1bf69ff1d 100644 --- a/src/SDL.c +++ b/src/SDL.c @@ -41,14 +41,15 @@ #include "SDL_log_c.h" #include "SDL_properties_c.h" #include "audio/SDL_sysaudio.h" +#include "camera/SDL_camera_c.h" #include "cpuinfo/SDL_cpuinfo_c.h" -#include "video/SDL_video_c.h" #include "events/SDL_events_c.h" #include "haptic/SDL_haptic_c.h" #include "joystick/SDL_gamepad_c.h" #include "joystick/SDL_joystick_c.h" #include "sensor/SDL_sensor_c.h" -#include "camera/SDL_camera_c.h" +#include "stdlib/SDL_getenv_c.h" +#include "video/SDL_video_c.h" #define SDL_INIT_EVERYTHING ~0U @@ -58,7 +59,6 @@ extern int SDL_HelperWindowCreate(void); extern int SDL_HelperWindowDestroy(void); #endif -extern void SDL_FreeEnvironmentMemory(void); #ifdef SDL_BUILD_MAJOR_VERSION SDL_COMPILE_TIME_ASSERT(SDL_BUILD_MAJOR_VERSION, diff --git a/src/events/SDL_mouse.c b/src/events/SDL_mouse.c index f550ab9cbc..832173cd73 100644 --- a/src/events/SDL_mouse.c +++ b/src/events/SDL_mouse.c @@ -404,7 +404,7 @@ SDL_Mouse *SDL_GetMouse(void) return &SDL_mouse; } -SDL_MouseButtonFlags SDL_GetMouseButtonState(SDL_Mouse *mouse, SDL_MouseID mouseID, SDL_bool include_touch) +static SDL_MouseButtonFlags SDL_GetMouseButtonState(SDL_Mouse *mouse, SDL_MouseID mouseID, SDL_bool include_touch) { int i; SDL_MouseButtonFlags buttonstate = 0; diff --git a/src/stdlib/SDL_getenv.c b/src/stdlib/SDL_getenv.c index 874cc1da6f..4bcab40ece 100644 --- a/src/stdlib/SDL_getenv.c +++ b/src/stdlib/SDL_getenv.c @@ -20,6 +20,8 @@ */ #include "SDL_internal.h" +#include "SDL_getenv_c.h" + #if defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_WINGDK) #include "../core/windows/SDL_windows.h" #endif diff --git a/src/stdlib/SDL_getenv_c.h b/src/stdlib/SDL_getenv_c.h new file mode 100644 index 0000000000..2001077346 --- /dev/null +++ b/src/stdlib/SDL_getenv_c.h @@ -0,0 +1,23 @@ +/* + Simple DirectMedia Layer + Copyright (C) 1997-2024 Sam Lantinga + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. +*/ +#include "SDL_internal.h" + +extern void SDL_FreeEnvironmentMemory(void);