mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-13 04:28:37 +00:00
Added events for the middle mouse button - EVENT_MBUTTONDOWN and EVENT_MBUTTONUP
svn-id: r30068
This commit is contained in:
parent
a54f9c311a
commit
806ac51e45
@ -306,6 +306,10 @@ bool OSystem_SDL::pollEvent(Common::Event &event) {
|
||||
event.type = Common::EVENT_WHEELUP;
|
||||
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);
|
||||
|
@ -55,6 +55,8 @@ enum EventType {
|
||||
EVENT_RBUTTONUP = 7,
|
||||
EVENT_WHEELUP = 8,
|
||||
EVENT_WHEELDOWN = 9,
|
||||
EVENT_MBUTTONDOWN = 13,
|
||||
EVENT_MBUTTONUP = 14,
|
||||
|
||||
EVENT_QUIT = 10,
|
||||
EVENT_SCREEN_CHANGED = 11,
|
||||
|
Loading…
Reference in New Issue
Block a user