1770 |
|
// Mouse button |
1771 |
|
case SDL_MOUSEBUTTONDOWN: { |
1772 |
|
unsigned int button = event.button.button; |
1773 |
< |
if (button < 4) |
1774 |
< |
ADBMouseDown(button - 1); |
1773 |
> |
if (button == SDL_BUTTON_LEFT) |
1774 |
> |
ADBMouseDown(0); |
1775 |
> |
else if (button == SDL_BUTTON_RIGHT) |
1776 |
> |
ADBMouseDown(1); |
1777 |
> |
else if (button == SDL_BUTTON_MIDDLE) |
1778 |
> |
ADBMouseDown(2); |
1779 |
|
else if (button < 6) { // Wheel mouse |
1780 |
|
if (mouse_wheel_mode == 0) { |
1781 |
|
int key = (button == 5) ? 0x79 : 0x74; // Page up/down |
1793 |
|
} |
1794 |
|
case SDL_MOUSEBUTTONUP: { |
1795 |
|
unsigned int button = event.button.button; |
1796 |
< |
if (button < 4) |
1797 |
< |
ADBMouseUp(button - 1); |
1796 |
> |
if (button == SDL_BUTTON_LEFT) |
1797 |
> |
ADBMouseUp(0); |
1798 |
> |
else if (button == SDL_BUTTON_RIGHT) |
1799 |
> |
ADBMouseUp(1); |
1800 |
> |
else if (button == SDL_BUTTON_MIDDLE) |
1801 |
> |
ADBMouseUp(2); |
1802 |
|
break; |
1803 |
|
} |
1804 |
|
|