1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Improve SDL GL fallback code

It now works even if window creation succeeds and only context creation fails.
Adapted from https://github.com/MoNTE48/Irrlicht . This should be fine
license-wise since that repo still contains the original Irrlicht license
(this is no legal advice).
Original PR: https://github.com/MoNTE48/Irrlicht/pull/9

Co-authored-by: Deve <deveee@gmail.com>
This commit is contained in:
Gregor Parzefall 2024-04-04 19:54:12 +02:00 committed by grorp
parent 07fdf7158d
commit cc1bfc6d03
2 changed files with 79 additions and 38 deletions

View file

@ -280,13 +280,13 @@ private:
void createDriver();
bool createWindow();
bool createWindowWithContext();
void createKeyMap();
void logAttributes();
SDL_GLContext Context;
SDL_Window *Window;
int SDL_Flags;
#if defined(_IRR_COMPILE_WITH_JOYSTICK_EVENTS_)
core::array<SDL_Joystick *> Joysticks;
#endif