OSX, fixed mouse pos in event.
git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1771 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
parent
bef6b3bbf6
commit
f9c4740894
@ -79,7 +79,11 @@ SFContext::SFContext(SFContext* shared, const WindowImpl* owner,
|
||||
SFContext::~SFContext()
|
||||
{
|
||||
[myContext release];
|
||||
[myPool release];
|
||||
[myPool drain]; // [1]
|
||||
|
||||
/*
|
||||
[1] : Produce sometimes "*** attempt to pop an unknown autorelease pool"
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
|
@ -160,7 +160,7 @@
|
||||
|
||||
NSPoint loc = [self convertPoint:[theEvent locationInWindow] fromView:nil];
|
||||
// Don't forget to change to SFML coord system.
|
||||
float h = [[theEvent window] frame].size.height;
|
||||
float h = [self frame].size.height;
|
||||
myRequester->MouseDownAt(sf::Mouse::Left, loc.x, h - loc.y);
|
||||
}
|
||||
|
||||
@ -172,7 +172,7 @@
|
||||
|
||||
NSPoint loc = [self convertPoint:[theEvent locationInWindow] fromView:nil];
|
||||
// Don't forget to change to SFML coord system.
|
||||
float h = [[theEvent window] frame].size.height;
|
||||
float h = [self frame].size.height;
|
||||
myRequester->MouseUpAt(sf::Mouse::Left, loc.x, h - loc.y);
|
||||
}
|
||||
|
||||
@ -199,7 +199,7 @@
|
||||
|
||||
NSPoint loc = [self convertPoint:[theEvent locationInWindow] fromView:nil];
|
||||
// Don't forget to change to SFML coord system.
|
||||
float h = [[theEvent window] frame].size.height;
|
||||
float h = [self frame].size.height;
|
||||
myRequester->MouseWheelScrolledAt([theEvent deltaY], loc.x, h - loc.y);
|
||||
}
|
||||
|
||||
@ -233,7 +233,7 @@
|
||||
|
||||
NSPoint loc = [self convertPoint:[theEvent locationInWindow] fromView:nil];
|
||||
// Don't forget to change to SFML coord system.
|
||||
float h = [[theEvent window] frame].size.height;
|
||||
float h = [self frame].size.height;
|
||||
myRequester->MouseDownAt(sf::Mouse::Right, loc.x, h - loc.y);
|
||||
}
|
||||
|
||||
@ -245,7 +245,7 @@
|
||||
|
||||
NSPoint loc = [self convertPoint:[theEvent locationInWindow] fromView:nil];
|
||||
// Don't forget to change to SFML coord system.
|
||||
float h = [[theEvent window] frame].size.height;
|
||||
float h = [self frame].size.height;
|
||||
myRequester->MouseUpAt(sf::Mouse::Right, loc.x, h - loc.y);
|
||||
}
|
||||
|
||||
@ -271,7 +271,7 @@
|
||||
break;
|
||||
}
|
||||
// Don't forget to change to SFML coord system.
|
||||
float h = [[theEvent window] frame].size.height;
|
||||
float h = [self frame].size.height;
|
||||
myRequester->MouseDownAt(button, loc.x, h - loc.y);
|
||||
}
|
||||
|
||||
@ -297,7 +297,7 @@
|
||||
break;
|
||||
}
|
||||
// Don't forget to change to SFML coord system.
|
||||
float h = [[theEvent window] frame].size.height;
|
||||
float h = [self frame].size.height;
|
||||
myRequester->MouseUpAt(button, loc.x, h - loc.y);
|
||||
}
|
||||
|
||||
@ -312,7 +312,7 @@
|
||||
|
||||
NSPoint loc = [self convertPoint:[theEvent locationInWindow] fromView:nil];
|
||||
// Don't forget to change to SFML coord system.
|
||||
float h = [[theEvent window] frame].size.height;
|
||||
float h = [self frame].size.height;
|
||||
myRequester->MouseMovedAt(loc.x, h - loc.y);
|
||||
}
|
||||
|
||||
@ -327,7 +327,7 @@
|
||||
|
||||
NSPoint loc = [self convertPoint:[theEvent locationInWindow] fromView:nil];
|
||||
// Don't forget to change to SFML coord system.
|
||||
float h = [[theEvent window] frame].size.height;
|
||||
float h = [self frame].size.height;
|
||||
myRequester->MouseMovedAt(loc.x, h - loc.y);
|
||||
}
|
||||
|
||||
@ -342,7 +342,7 @@
|
||||
|
||||
NSPoint loc = [self convertPoint:[theEvent locationInWindow] fromView:nil];
|
||||
// Don't forget to change to SFML coord system.
|
||||
float h = [[theEvent window] frame].size.height;
|
||||
float h = [self frame].size.height;
|
||||
myRequester->MouseMovedAt(loc.x, h - loc.y);
|
||||
}
|
||||
|
||||
|
@ -104,7 +104,7 @@ WindowImplCocoa::~WindowImplCocoa()
|
||||
[myDelegate closeWindow];
|
||||
|
||||
[myDelegate release];
|
||||
[myPool release];
|
||||
[myPool drain];
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user