SDL 1.2.x: capture mouse when button is pressed as well
This commit is contained in:
parent
73f5f1d214
commit
546a6fecd2
@ -1305,6 +1305,8 @@ int Get_input(int sleep_time)
|
|||||||
case SDL_MOUSEBUTTONDOWN:
|
case SDL_MOUSEBUTTONDOWN:
|
||||||
#ifdef USE_SDL2
|
#ifdef USE_SDL2
|
||||||
SDL_CaptureMouse(SDL_TRUE);
|
SDL_CaptureMouse(SDL_TRUE);
|
||||||
|
#else
|
||||||
|
SDL_WM_GrabInput(SDL_GRAB_ON);
|
||||||
#endif
|
#endif
|
||||||
Handle_mouse_click(&event.button);
|
Handle_mouse_click(&event.button);
|
||||||
user_feedback_required = 1;
|
user_feedback_required = 1;
|
||||||
@ -1313,6 +1315,8 @@ int Get_input(int sleep_time)
|
|||||||
case SDL_MOUSEBUTTONUP:
|
case SDL_MOUSEBUTTONUP:
|
||||||
#ifdef USE_SDL2
|
#ifdef USE_SDL2
|
||||||
SDL_CaptureMouse(SDL_FALSE);
|
SDL_CaptureMouse(SDL_FALSE);
|
||||||
|
#else
|
||||||
|
SDL_WM_GrabInput(SDL_GRAB_OFF);
|
||||||
#endif
|
#endif
|
||||||
Handle_mouse_release(&event.button);
|
Handle_mouse_release(&event.button);
|
||||||
user_feedback_required = 1;
|
user_feedback_required = 1;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user