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 };