From f694529727683752f2d13d3ec41f47f36ef046dc Mon Sep 17 00:00:00 2001 From: Alam Ed Arias <alam@srb2.org> Date: Sat, 29 Mar 2025 14:00:52 -0400 Subject: [PATCH] SDL2: use SDL_GetSystemRAM() to get total RAM --- src/sdl/i_system.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/sdl/i_system.c b/src/sdl/i_system.c index 3def7e3bd1..ccf4be27b4 100644 --- a/src/sdl/i_system.c +++ b/src/sdl/i_system.c @@ -3239,7 +3239,13 @@ size_t I_GetFreeMem(size_t *total) #else // Guess 48 MB. if (total) + { +#if SDL_VERSION_ATLEAST(2,0,1) + *total = SDL_GetSystemRAM(); +#else *total = 48<<20; +#endif + } return 48<<20; #endif } -- GitLab