From 8c52dce565e986b0ddb7a3fd007379efdc39f6bf Mon Sep 17 00:00:00 2001 From: Sasha Szpakowski Date: Sat, 12 Oct 2024 13:40:31 -0300 Subject: [PATCH] actually fix megatest for real --- src/test.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/test.cpp b/src/test.cpp index 151c72462..84a14244f 100644 --- a/src/test.cpp +++ b/src/test.cpp @@ -12,6 +12,7 @@ #include #if __has_include() #include +#include #else #include #endif @@ -89,21 +90,23 @@ int main(int argc, char **argv) vfunc SDL = [](strs &c, strs &l) { #if SDL_VERSION_ATLEAST(3, 0, 0) - SDL_Version compiled; - SDL_Version linked; + int compiled = SDL_VERSION; + int linked = SDL_GetVersion(); + + c << SDL_VERSIONNUM_MAJOR(compiled) << "." << SDL_VERSIONNUM_MINOR(compiled) << "." << SDL_VERSIONNUM_MICRO(compiled); + l << SDL_VERSIONNUM_MAJOR(linked) << "." << SDL_VERSIONNUM_MINOR(linked) << "." << SDL_VERSIONNUM_MICRO(linked); + + return "SDL3"; #else SDL_version compiled; SDL_version linked; -#endif SDL_VERSION(&compiled); SDL_GetVersion(&linked); c << (int)compiled.major << "." << (int)compiled.minor << "." << (int)compiled.patch; l << (int)linked.major << "." << (int)linked.minor << "." << (int)linked.patch; -#if SDL_VERSION_ATLEAST(3, 0, 0) - return "SDL3"; -#else + return "SDL2"; #endif };