mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Print if sdl2-compat is in use
This commit is contained in:
parent
42a35cec83
commit
22c81e5292
2 changed files with 18 additions and 15 deletions
|
@ -308,8 +308,6 @@ CIrrDeviceSDL::CIrrDeviceSDL(const SIrrlichtCreationParameters ¶m) :
|
||||||
if (SDL_Init(flags) < 0) {
|
if (SDL_Init(flags) < 0) {
|
||||||
os::Printer::log("Unable to initialize SDL", SDL_GetError(), ELL_ERROR);
|
os::Printer::log("Unable to initialize SDL", SDL_GetError(), ELL_ERROR);
|
||||||
Close = true;
|
Close = true;
|
||||||
} else {
|
|
||||||
os::Printer::log("SDL initialized", ELL_INFORMATION);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -324,21 +322,27 @@ CIrrDeviceSDL::CIrrDeviceSDL(const SIrrlichtCreationParameters ¶m) :
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SDL_VERSION(&Info.version);
|
core::stringc sdlver = "SDL ";
|
||||||
|
{
|
||||||
|
SDL_version v{};
|
||||||
|
SDL_GetVersion(&v);
|
||||||
|
sdlver += v.major;
|
||||||
|
sdlver += ".";
|
||||||
|
sdlver += v.minor;
|
||||||
|
sdlver += ".";
|
||||||
|
sdlver += v.patch;
|
||||||
|
// the SDL team seems to intentionally number sdl2-compat this way:
|
||||||
|
// <https://github.com/libsdl-org/sdl2-compat/tags>
|
||||||
|
if (v.patch >= 50)
|
||||||
|
sdlver += " (compat)";
|
||||||
|
|
||||||
#ifndef _IRR_EMSCRIPTEN_PLATFORM_
|
sdlver += " on ";
|
||||||
SDL_GetWindowWMInfo(Window, &Info);
|
sdlver += SDL_GetPlatform();
|
||||||
#endif //_IRR_EMSCRIPTEN_PLATFORM_
|
}
|
||||||
core::stringc sdlversion = "SDL Version ";
|
|
||||||
sdlversion += Info.version.major;
|
|
||||||
sdlversion += ".";
|
|
||||||
sdlversion += Info.version.minor;
|
|
||||||
sdlversion += ".";
|
|
||||||
sdlversion += Info.version.patch;
|
|
||||||
|
|
||||||
Operator = new COSOperator(sdlversion);
|
Operator = new COSOperator(sdlver);
|
||||||
if (SDLDeviceInstances == 1) {
|
if (SDLDeviceInstances == 1) {
|
||||||
os::Printer::log(sdlversion.c_str(), ELL_INFORMATION);
|
os::Printer::log(sdlver.c_str(), ELL_INFORMATION);
|
||||||
}
|
}
|
||||||
|
|
||||||
// create cursor control
|
// create cursor control
|
||||||
|
|
|
@ -340,7 +340,6 @@ private:
|
||||||
};
|
};
|
||||||
|
|
||||||
core::array<SKeyMap> KeyMap;
|
core::array<SKeyMap> KeyMap;
|
||||||
SDL_SysWMinfo Info;
|
|
||||||
|
|
||||||
s32 CurrentTouchCount;
|
s32 CurrentTouchCount;
|
||||||
bool IsInBackground;
|
bool IsInBackground;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue