1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-11-20 08:25:23 +01:00

IrrlichtMt: Initial SDL3 support (#16583)

This commit implements support for SDL3, more specifically, >= 3.2.0 (the first released version).
Almost all changes were made according to https://github.com/libsdl-org/SDL/blob/release-3.2.10/docs/README-migration.md?plain=1 and the suggestions provided by `SDL3/SDL_oldnames.h`.
This commit is contained in:
SmallJoker
2025-11-17 20:55:52 +01:00
committed by GitHub
parent fcd96e9244
commit 36c261c1f0
12 changed files with 465 additions and 187 deletions

View File

@@ -14,7 +14,8 @@ enum E_DEVICE_TYPE
EIDT_OSX,
//! A device which uses Simple DirectMedia Layer
/** The SDL device works under all platforms supported by SDL. */
/** The SDL device works under all platforms supported by SDL2 or SDL3.
See also: CMake option 'USE_SDL3' */
EIDT_SDL,
//! This selection allows Irrlicht to choose the best device from the ones available.

View File

@@ -361,6 +361,7 @@ public:
\return The corresponding keycode.
*/
virtual Keycode getKeyFromScancode(const u32 scancode) const {
return Keycode(KEY_UNKNOWN, (wchar_t)scancode);
(void)scancode;
return Keycode(KEY_UNKNOWN, (wchar_t)0xFFFF);
}
};