diff options
author | Paul Gilbert | 2007-12-29 09:48:49 +0000 |
---|---|---|
committer | Paul Gilbert | 2007-12-29 09:48:49 +0000 |
commit | 806ac51e45acd1997ef87f7e7824ecf6b4f8ec64 (patch) | |
tree | 4c70f97e28987440aafe930243720f4318eff948 /backends/platform/sdl | |
parent | a54f9c311a7b981234822e558ca008a130eb4de8 (diff) | |
download | scummvm-rg350-806ac51e45acd1997ef87f7e7824ecf6b4f8ec64.tar.gz scummvm-rg350-806ac51e45acd1997ef87f7e7824ecf6b4f8ec64.tar.bz2 scummvm-rg350-806ac51e45acd1997ef87f7e7824ecf6b4f8ec64.zip |
Added events for the middle mouse button - EVENT_MBUTTONDOWN and EVENT_MBUTTONUP
svn-id: r30068
Diffstat (limited to 'backends/platform/sdl')
-rw-r--r-- | backends/platform/sdl/events.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/backends/platform/sdl/events.cpp b/backends/platform/sdl/events.cpp index 255a0e0e66..9a0a33f45c 100644 --- a/backends/platform/sdl/events.cpp +++ b/backends/platform/sdl/events.cpp @@ -307,6 +307,10 @@ bool OSystem_SDL::pollEvent(Common::Event &event) { else if (ev.button.button == SDL_BUTTON_WHEELDOWN) event.type = Common::EVENT_WHEELDOWN; #endif +#if defined(SDL_BUTTON_MIDDLE) + else if (ev.button.button == SDL_BUTTON_MIDDLE) + event.type = Common::EVENT_MBUTTONDOWN; +#endif else break; @@ -319,6 +323,10 @@ bool OSystem_SDL::pollEvent(Common::Event &event) { event.type = Common::EVENT_LBUTTONUP; else if (ev.button.button == SDL_BUTTON_RIGHT) event.type = Common::EVENT_RBUTTONUP; +#if defined(SDL_BUTTON_MIDDLE) + else if (ev.button.button == SDL_BUTTON_MIDDLE) + event.type = Common::EVENT_MBUTTONUP; +#endif else break; fillMouseEvent(event, ev.button.x, ev.button.y); |