From 7404ea61789eb7416af6b0e9cc837d0fa13142b5 Mon Sep 17 00:00:00 2001 From: Dav999 Date: Sun, 23 Aug 2026 16:34:43 +0200 Subject: [PATCH] Fix SDL_PLATFORM_UNI defines Just did my first SDL3 compile and noticed the console messages didn't have any color anymore... Because that was conditional to SDL_PLATFORM_UNI. I saw this during the SDL3 PR and found it odd, but it's on https://wiki.libsdl.org/SDL3/README-migration#sdl_platformh. It turns out it actually doesn't exist, it's supposed to be SDL_PLATFORM_UNIX. --- desktop_version/src/FileSystemUtils.cpp | 2 +- desktop_version/src/Vlogging.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/desktop_version/src/FileSystemUtils.cpp b/desktop_version/src/FileSystemUtils.cpp index f4d1adb8..581141ca 100644 --- a/desktop_version/src/FileSystemUtils.cpp +++ b/desktop_version/src/FileSystemUtils.cpp @@ -36,7 +36,7 @@ static int mkdir(char* path, int mode) #include #include #define MAX_PATH PATH_MAX -#elif defined(SDL_PLATFORM_LINUX) || defined(SDL_PLATFORM_APPLE) || defined(SDL_PLATFORM_FREEBSD) || defined(SDL_PLATFORM_OPENBSD) || defined(SDL_PLATFORM_HAIKU) || defined(__DragonFly__) || defined(SDL_PLATFORM_UNI) +#elif defined(SDL_PLATFORM_LINUX) || defined(SDL_PLATFORM_APPLE) || defined(SDL_PLATFORM_FREEBSD) || defined(SDL_PLATFORM_OPENBSD) || defined(SDL_PLATFORM_HAIKU) || defined(__DragonFly__) || defined(SDL_PLATFORM_UNIX) #include #include #define MAX_PATH PATH_MAX diff --git a/desktop_version/src/Vlogging.c b/desktop_version/src/Vlogging.c index 5d77e07b..2fab29c6 100644 --- a/desktop_version/src/Vlogging.c +++ b/desktop_version/src/Vlogging.c @@ -14,7 +14,7 @@ #elif defined(_WIN32) # define WIN32_LEAN_AND_MEAN # include -#elif defined(SDL_PLATFORM_UNI) || defined(SDL_PLATFORM_APPLE) +#elif defined(SDL_PLATFORM_UNIX) || defined(SDL_PLATFORM_APPLE) # include #endif @@ -285,7 +285,7 @@ static void check_color_support(void) } color_supported = 1; -#elif (defined(SDL_PLATFORM_UNI) || defined(SDL_PLATFORM_APPLE)) && !defined(VLOG_USE_SDL) +#elif (defined(SDL_PLATFORM_UNIX) || defined(SDL_PLATFORM_APPLE)) && !defined(VLOG_USE_SDL) if (isatty(STDOUT_FILENO) && isatty(STDERR_FILENO)) { color_supported = 1;