mirror of https://github.com/encounter/SDL.git
412ceb84d4
Since #5602, SDL is intended to have the same ABI across the whole
major-version 2 cycle, so we should not check that the minor version
matches the one that was used to compile an application.
There are two checks that could make sense here.
The first check is that the major version matches the expected major
version. This is usually unnecessary and is not usually done (if we're
calling into the wrong library we'll likely crash anyway), but since we
have the information, we might as well continue to use it.
The second check is whether the version provided by the caller is
equal to or greater than a threshold version at which additional fields
were added to the struct. If it is, we should populate those fields;
if it is not, then we cannot. This is only useful on platforms where
additional fields have genuinely been added during the lifetime of
SDL 2, like Windows and DirectFB (but not X11).
This commit changes the first check to be consistent about only looking
at the minor version, while leaving the second check using SDL_VERSIONNUM
(which will be removed or widened in SDL 3, but it's fine for now).
Resolves: https://github.com/libsdl-org/SDL/issues/5711
Fixes:
|
||
---|---|---|
.. | ||
SDL_BApp.h | ||
SDL_BWin.h | ||
SDL_bclipboard.cc | ||
SDL_bclipboard.h | ||
SDL_bevents.cc | ||
SDL_bevents.h | ||
SDL_bframebuffer.cc | ||
SDL_bframebuffer.h | ||
SDL_bkeyboard.cc | ||
SDL_bkeyboard.h | ||
SDL_bmessagebox.cc | ||
SDL_bmessagebox.h | ||
SDL_bmodes.cc | ||
SDL_bmodes.h | ||
SDL_bopengl.cc | ||
SDL_bopengl.h | ||
SDL_bvideo.cc | ||
SDL_bvideo.h | ||
SDL_bwindow.cc | ||
SDL_bwindow.h |