mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-21 13:29:03 +00:00
Wrap old SDL code in a preproc directive.
This commit is contained in:
parent
ec2af1d30d
commit
60945558a9
@ -214,6 +214,7 @@ void slider::mouse_down(const SDL_MouseButtonEvent& event)
|
||||
if (!point_in_rect(event.x, event.y, location()))
|
||||
return;
|
||||
|
||||
#if !SDL_VERSION_ATLEAST(2,0,0)
|
||||
if (event.button == SDL_BUTTON_WHEELUP || event.button == SDL_BUTTON_WHEELRIGHT) {
|
||||
value_change_ = false;
|
||||
set_focus(true);
|
||||
@ -234,6 +235,7 @@ void slider::mouse_down(const SDL_MouseButtonEvent& event)
|
||||
value_change_ = prev_change;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (event.button != SDL_BUTTON_LEFT)
|
||||
return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user