mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-16 00:12:51 +00:00
(svn r11520) -Fix: [OSX] The cocoa video driver let the mouse cursor escape the window when using rmb scrolling. Thanks ln- for pointing this out and providing a fix.
This commit is contained in:
parent
d061d985d6
commit
9aaa455e5d
@ -430,7 +430,6 @@ static bool QZ_PollEvent()
|
|||||||
switch ([event type]) {
|
switch ([event type]) {
|
||||||
case NSMouseMoved:
|
case NSMouseMoved:
|
||||||
case NSOtherMouseDragged:
|
case NSOtherMouseDragged:
|
||||||
case NSRightMouseDragged:
|
|
||||||
case NSLeftMouseDragged:
|
case NSLeftMouseDragged:
|
||||||
pt = _cocoa_subdriver->GetMouseLocation(event);
|
pt = _cocoa_subdriver->GetMouseLocation(event);
|
||||||
if (!_cocoa_subdriver->MouseIsInsideView(&pt) &&
|
if (!_cocoa_subdriver->MouseIsInsideView(&pt) &&
|
||||||
@ -444,6 +443,12 @@ static bool QZ_PollEvent()
|
|||||||
QZ_MouseMovedEvent((int)pt.x, (int)pt.y);
|
QZ_MouseMovedEvent((int)pt.x, (int)pt.y);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case NSRightMouseDragged:
|
||||||
|
pt = _cocoa_subdriver->GetMouseLocation(event);
|
||||||
|
QZ_HideMouse();
|
||||||
|
QZ_MouseMovedEvent((int)pt.x, (int)pt.y);
|
||||||
|
break;
|
||||||
|
|
||||||
case NSLeftMouseDown:
|
case NSLeftMouseDown:
|
||||||
{
|
{
|
||||||
uint32 keymask = 0;
|
uint32 keymask = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user