Fixed bug 1166 (No mouse motion events while SDL_SetRelativeMouseMode() is active and holding the mouse button)
This commit is contained in:
parent
8fe03ca350
commit
06a33455ca
1 changed files with 5 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue