Skip to content

Commit

Permalink
Wrap old SDL code in a preproc directive.
Browse files Browse the repository at this point in the history
  • Loading branch information
lipk committed Mar 14, 2014
1 parent ec2af1d commit 6094555
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/widgets/slider.cpp
Expand Up @@ -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);
Expand All @@ -234,6 +235,7 @@ void slider::mouse_down(const SDL_MouseButtonEvent& event)
value_change_ = prev_change;
}
}
#endif

if (event.button != SDL_BUTTON_LEFT)
return;
Expand Down

0 comments on commit 6094555

Please sign in to comment.