mirror of
https://github.com/minetest/minetest.git
synced 2025-03-06 20:48:40 +01: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) {
|
||||
os::Printer::log("Unable to initialize SDL", SDL_GetError(), ELL_ERROR);
|
||||
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_
|
||||
SDL_GetWindowWMInfo(Window, &Info);
|
||||
#endif //_IRR_EMSCRIPTEN_PLATFORM_
|
||||
core::stringc sdlversion = "SDL Version ";
|
||||
sdlversion += Info.version.major;
|
||||
sdlversion += ".";
|
||||
sdlversion += Info.version.minor;
|
||||
sdlversion += ".";
|
||||
sdlversion += Info.version.patch;
|
||||
sdlver += " on ";
|
||||
sdlver += SDL_GetPlatform();
|
||||
}
|
||||
|
||||
Operator = new COSOperator(sdlversion);
|
||||
Operator = new COSOperator(sdlver);
|
||||
if (SDLDeviceInstances == 1) {
|
||||
os::Printer::log(sdlversion.c_str(), ELL_INFORMATION);
|
||||
os::Printer::log(sdlver.c_str(), ELL_INFORMATION);
|
||||
}
|
||||
|
||||
// create cursor control
|
||||
|
|
|
@ -340,7 +340,6 @@ private:
|
|||
};
|
||||
|
||||
core::array<SKeyMap> KeyMap;
|
||||
SDL_SysWMinfo Info;
|
||||
|
||||
s32 CurrentTouchCount;
|
||||
bool IsInBackground;
|
||||
|
|
Loading…
Add table
Reference in a new issue