mirror of
https://github.com/ptitSeb/Serious-Engine
synced 2024-11-26 04:05:53 +01:00
Use SDL constants for mouse buttons
This commit is contained in:
parent
0c16613056
commit
19bd3f733b
|
@ -59,7 +59,7 @@ BOOL PeekMessage(MSG *msg, void *hwnd, UINT wMsgFilterMin,
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SDL_MOUSEBUTTONDOWN:
|
case SDL_MOUSEBUTTONDOWN:
|
||||||
if (sdlevent.button.button == 2) // right button...
|
if (sdlevent.button.button == SDL_BUTTON_RIGHT) // right button...
|
||||||
{
|
{
|
||||||
msg->message = WM_RBUTTONDOWN;
|
msg->message = WM_RBUTTONDOWN;
|
||||||
} // if
|
} // if
|
||||||
|
@ -78,7 +78,7 @@ BOOL PeekMessage(MSG *msg, void *hwnd, UINT wMsgFilterMin,
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SDL_MOUSEBUTTONUP:
|
case SDL_MOUSEBUTTONUP:
|
||||||
if (sdlevent.button.button == 2) // right button...
|
if (sdlevent.button.button == SDL_BUTTON_RIGHT) // right button...
|
||||||
{
|
{
|
||||||
msg->message = WM_RBUTTONUP;
|
msg->message = WM_RBUTTONUP;
|
||||||
} // if
|
} // if
|
||||||
|
|
|
@ -328,13 +328,13 @@ static void sdl_event_handler(const SDL_Event *event)
|
||||||
case SDL_MOUSEBUTTONDOWN:
|
case SDL_MOUSEBUTTONDOWN:
|
||||||
switch (event->button.button)
|
switch (event->button.button)
|
||||||
{
|
{
|
||||||
case 1:
|
case SDL_BUTTON_LEFT:
|
||||||
_abKeysPressed[KID_MOUSE1] = TRUE;
|
_abKeysPressed[KID_MOUSE1] = TRUE;
|
||||||
break;
|
break;
|
||||||
case 2:
|
case SDL_BUTTON_RIGHT:
|
||||||
_abKeysPressed[KID_MOUSE2] = TRUE;
|
_abKeysPressed[KID_MOUSE2] = TRUE;
|
||||||
break;
|
break;
|
||||||
case 3:
|
case SDL_BUTTON_MIDDLE:
|
||||||
_abKeysPressed[KID_MOUSE3] = TRUE;
|
_abKeysPressed[KID_MOUSE3] = TRUE;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -351,13 +351,13 @@ static void sdl_event_handler(const SDL_Event *event)
|
||||||
case SDL_MOUSEBUTTONUP:
|
case SDL_MOUSEBUTTONUP:
|
||||||
switch (event->button.button)
|
switch (event->button.button)
|
||||||
{
|
{
|
||||||
case 1:
|
case SDL_BUTTON_LEFT:
|
||||||
_abKeysPressed[KID_MOUSE1] = FALSE;
|
_abKeysPressed[KID_MOUSE1] = FALSE;
|
||||||
break;
|
break;
|
||||||
case 2:
|
case SDL_BUTTON_RIGHT:
|
||||||
_abKeysPressed[KID_MOUSE2] = FALSE;
|
_abKeysPressed[KID_MOUSE2] = FALSE;
|
||||||
break;
|
break;
|
||||||
case 3:
|
case SDL_BUTTON_MIDDLE:
|
||||||
_abKeysPressed[KID_MOUSE3] = FALSE;
|
_abKeysPressed[KID_MOUSE3] = FALSE;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user