mirror of
https://github.com/yawut/SDL.git
synced 2026-09-07 00:25:37 -05:00
Fixed bug 1166 (No mouse motion events while SDL_SetRelativeMouseMode() is active and holding the mouse button)
This commit is contained in:
@@ -168,7 +168,11 @@ Cocoa_HandleMouseEvent(_THIS, NSEvent *event)
|
||||
{
|
||||
SDL_Mouse *mouse = SDL_GetMouse();
|
||||
|
||||
if (mouse->relative_mode && [event type] == NSMouseMoved) {
|
||||
if (mouse->relative_mode &&
|
||||
([event type] == NSMouseMoved ||
|
||||
[event type] == NSLeftMouseDragged ||
|
||||
[event type] == NSRightMouseDragged ||
|
||||
[event type] == NSOtherMouseDragged)) {
|
||||
float x = [event deltaX];
|
||||
float y = [event deltaY];
|
||||
SDL_SendMouseMotion(mouse->focus, 1, (int)x, (int)y);
|
||||
|
||||
Reference in New Issue
Block a user