diff options
| author | 2026-02-07 13:32:37 -0500 | |
|---|---|---|
| committer | 2026-02-07 13:32:37 -0500 | |
| commit | 8349e95e3e0ea4d3081739e2b8bb5787b9e366ba (patch) | |
| tree | 89c058b1454f3c898fb918dc2ce1c7a2fb701e4b /src/osd/modules/render/drawogl.cpp | |
| parent | dba6d057f1186642e73eb7fa020aabf9647b163f (diff) | |
Initial support for SDL3. [R. Belmont, Vas Crabb]
* SDL3 is the default for macOS targets. Linux/Windows can build with
OSD=sdl3 while we wait for better distro support for SDL3. Both X11 and
Wayland sessions are fully supported on Linux.
* SDL3 -sound=sdl supports both input and output. All other video, sound,
and input functionality should otherwise be the same for now. SDL 3.4+
multiple keyboard/mouse support is planned.
Diffstat (limited to 'src/osd/modules/render/drawogl.cpp')
| -rw-r--r-- | src/osd/modules/render/drawogl.cpp | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/osd/modules/render/drawogl.cpp b/src/osd/modules/render/drawogl.cpp index f9f76946bf4..b9229ed46f3 100644 --- a/src/osd/modules/render/drawogl.cpp +++ b/src/osd/modules/render/drawogl.cpp @@ -49,7 +49,11 @@ typedef uint64_t HashT; // standard SDL headers #define TOBEMIGRATED 1 +#ifdef SDLMAME_SDL3 +#include <SDL3/SDL.h> +#else #include <SDL2/SDL.h> +#endif #endif // !defined(OSD_WINDOWS && !defined(OSD_MAC) @@ -1244,16 +1248,9 @@ int renderer_ogl::draw(const int update) /* Mac hack: macOS version 10.15 and later flipped from assuming you don't support Retina to - assuming you do support Retina. SDL 2.0.11 is scheduled to fix this, but it's not out yet. - So we double-scale everything if you're on 10.15 or later and SDL is not at least version 2.0.11. + assuming you do support Retina. */ - #if defined(SDLMAME_MACOSX) && !defined(OSD_MAC) - SDL_version sdlVers; - SDL_GetVersion(&sdlVers); - // Only do this if SDL is not at least 2.0.11. - if ((sdlVers.major == 2) && (sdlVers.minor == 0) && (sdlVers.patch < 11)) - #endif - #if defined(SDLMAME_MACOSX) || defined(OSD_MAC) + #if !defined(SDLMAME_MACOSX) && defined(OSD_MAC) { // now get the Darwin kernel version int dMaj, dMin, dPatch; |
