SaveTool: change the SDL version check.
This commit is contained in:
parent
5ea6f1e3a7
commit
0aa933e766
1 changed files with 8 additions and 9 deletions
|
@ -65,18 +65,17 @@ SaveTool::SaveTool(const Arguments& arguments):
|
|||
GL::Renderer::BlendEquation::Add);
|
||||
|
||||
LOG_INFO("Configuring SDL2.");
|
||||
if(SDL_VERSION_ATLEAST(2, 0, 5)) {
|
||||
if(SDL_SetHintWithPriority(SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH, "1", SDL_HINT_OVERRIDE) == SDL_TRUE) {
|
||||
LOG_INFO("Clickthrough is enabled.");
|
||||
}
|
||||
else {
|
||||
LOG_WARNING("Clickthrough is disabled.");
|
||||
}
|
||||
#if SDL_VERSION_ATLEAST(2,0,5)
|
||||
if(SDL_SetHintWithPriority(SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH, "1", SDL_HINT_OVERRIDE) == SDL_TRUE) {
|
||||
LOG_INFO("Clickthrough is enabled.");
|
||||
}
|
||||
else {
|
||||
LOG_WARNING_FORMAT("Clickthrough is disabled: SDL2 version is too old ({}.{}.{})",
|
||||
SDL_MAJOR_VERSION, SDL_MINOR_VERSION, SDL_PATCHLEVEL);
|
||||
LOG_WARNING("Clickthrough is disabled.");
|
||||
}
|
||||
#else
|
||||
LOG_WARNING_FORMAT("Clickthrough is disabled: SDL2 version is too old ({}.{}.{})",
|
||||
SDL_MAJOR_VERSION, SDL_MINOR_VERSION, SDL_PATCHLEVEL);
|
||||
#endif
|
||||
|
||||
LOG_INFO("Registering custom events.");
|
||||
if((_initEventId = SDL_RegisterEvents(3)) == UnsignedInt(-1)) {
|
||||
|
|
Loading…
Reference in a new issue