Skip to content

Commit

Permalink
Add support for horizontal mouse wheel events in emscripten backend.
Browse files Browse the repository at this point in the history
  • Loading branch information
jminor committed Feb 20, 2019
1 parent 8909aea commit 547cc26
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/am_backend_emscripten.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,7 @@ static bool handle_events() {
break;
}
case SDL_MOUSEWHEEL: {
mouse_wheel_x += event.wheel.x > 0 ? 1 : event.wheel.x < 0 ? -1 : 0;
mouse_wheel_y += event.wheel.y > 0 ? 1 : event.wheel.y < 0 ? -1 : 0;
break;
}
Expand Down

0 comments on commit 547cc26

Please sign in to comment.