From bd62da3ff663cb6bdca5afabb82c470ac5eda40b Mon Sep 17 00:00:00 2001 From: Vladimir Berezniker Date: Fri, 17 Jan 2025 18:22:56 -0500 Subject: [PATCH] Make code compatible with SDL3 3.1.8 plus --- client/SDL/SDL3/sdl_clip.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/client/SDL/SDL3/sdl_clip.cpp b/client/SDL/SDL3/sdl_clip.cpp index 6f61c9ff1..e88cfc08b 100644 --- a/client/SDL/SDL3/sdl_clip.cpp +++ b/client/SDL/SDL3/sdl_clip.cpp @@ -176,7 +176,11 @@ bool sdlClip::handle_update(const SDL_ClipboardEvent& ev) std::vector clientFormatNames; std::vector clientFormats; +#if SDL_VERSION_ATLEAST(3, 1, 8) + size_t nformats = WINPR_ASSERTING_INT_CAST(size_t, ev.num_mime_types); +#else size_t nformats = WINPR_ASSERTING_INT_CAST(size_t, ev.n_mime_types); +#endif const char** clipboard_mime_formats = ev.mime_types; WLog_Print(_log, WLOG_TRACE, "SDL has %d formats", nformats);