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.
This commit is contained in:
Dav999
2026-08-23 10:51:31 -04:00
committed by Ethan Lee
parent 8b1959db19
commit 7404ea6178
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -36,7 +36,7 @@ static int mkdir(char* path, int mode)
#include <sys/stat.h>
#include <emscripten.h>
#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 <limits.h>
#include <sys/stat.h>
#define MAX_PATH PATH_MAX
+2 -2
View File
@@ -14,7 +14,7 @@
#elif defined(_WIN32)
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
#elif defined(SDL_PLATFORM_UNI) || defined(SDL_PLATFORM_APPLE)
#elif defined(SDL_PLATFORM_UNIX) || defined(SDL_PLATFORM_APPLE)
# include <unistd.h>
#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;