Skip to content

Instantly share code, notes, and snippets.

@tarmolehtpuu
Created May 23, 2011 18:58
Show Gist options
  • Save tarmolehtpuu/987290 to your computer and use it in GitHub Desktop.
Save tarmolehtpuu/987290 to your computer and use it in GitHub Desktop.
patch SDL for UrT 4.0 to window mode full screen (OS X)
--- a/src/video/quartz/SDL_QuartzVideo.m Thu Feb 17 02:31:50 2011 -0800
+++ b/src/video/quartz/SDL_QuartzVideo.m Tue Feb 22 22:21:26 2011 +0200
@@ -761,7 +761,7 @@
[ qz_window setFrameTopLeftPoint:NSMakePoint((float) origin_x, (float) (this->info.current_h - origin_y))];
center_window = 0;
} else if ( center_window ) {
- [ qz_window center ];
+ [ qz_window setFrameTopLeftPoint:NSMakePoint((float) 0, (float) [[qz_window screen] frame].size.height)];
}
[ qz_window setDelegate:
diff -r d898ee5431f5 -r df29b3529ace src/video/quartz/SDL_QuartzWindow.m
--- a/src/video/quartz/SDL_QuartzWindow.m Thu Feb 17 02:31:50 2011 -0800
+++ b/src/video/quartz/SDL_QuartzWindow.m Tue Feb 22 22:21:26 2011 +0200
@@ -194,7 +194,7 @@
[ [ NSNotificationCenter defaultCenter ] addObserver:self
selector:@selector(appWillUnhide:) name:NSApplicationWillUnhideNotification object:NSApp ];
- return [ super initWithContentRect:contentRect styleMask:styleMask backing:backingType defer:flag ];
+ return [ super initWithContentRect:contentRect styleMask:0 backing:backingType defer:flag ];
}
@end
@tarmolehtpuu
Copy link
Author

Also add the following key/value pair to ioUrbanTerror.app/Contents/Info.plist

<key>LSUIPresentationMode</key>
<integer>4</integer>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment