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 8556d7a commit 3318137
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/editor/palette/palette_manager.cpp
Expand Up @@ -166,6 +166,8 @@ void palette_manager::handle_event(const SDL_Event& event) {
}

const SDL_MouseButtonEvent mouse_button_event = event.button;

#if !SDL_VERSION_ATLEAST(2,0,0)
if (mouse_button_event.type == SDL_MOUSEBUTTONDOWN) {
if (mouse_button_event.button == SDL_BUTTON_WHEELUP) {
scroll_up();
Expand All @@ -183,6 +185,7 @@ void palette_manager::handle_event(const SDL_Event& event) {
}
//set_dirty(true);
}
#endif

#if SDL_VERSION_ATLEAST(2,0,0)
if (event.type == SDL_MOUSEWHEEL) {
Expand Down

0 comments on commit 3318137

Please sign in to comment.