Fix fullscreen origin on Mac OS X 10.4
This commit is contained in:
parent
3f465b7523
commit
c506aacb3a
1 changed files with 6 additions and 0 deletions
|
@ -823,6 +823,12 @@ Cocoa_SetWindowFullscreen(_THIS, SDL_Window * window, SDL_VideoDisplay * display
|
|||
rect.size.height = bounds.h;
|
||||
ConvertNSRect(&rect);
|
||||
|
||||
/* Hack to fix origin on Mac OS X 10.4 */
|
||||
NSRect screenRect = [[nswindow screen] frame];
|
||||
if (screenRect.size.height >= 1.0f) {
|
||||
rect.origin.y += (screenRect.size.height - rect.size.height);
|
||||
}
|
||||
|
||||
if ([nswindow respondsToSelector: @selector(setStyleMask:)]) {
|
||||
[nswindow performSelector: @selector(setStyleMask:) withObject: (id)NSBorderlessWindowMask];
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue