Created
June 18, 2017 04:00
-
-
Save kode54/f8f5c7801dd9df6b1ccde784bb573ba6 to your computer and use it in GitHub Desktop.
Patch against libpez Cocoa implementation for HiDPI support
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- pez.cocoa.m 2010-05-15 14:54:51.000000000 -0700 | |
+++ pez.cocoa.m 2017-06-17 20:58:12.000000000 -0700 | |
@@ -53,6 +53,8 @@ | |
[fmt release]; | |
+ [self setWantsBestResolutionOpenGLSurface:YES]; | |
+ | |
m_frameRect = frame; | |
m_previousTime = mach_absolute_time(); | |
@@ -80,9 +82,11 @@ | |
[[self window] setOpaque:NO]; | |
[[self window] setAlphaValue:0.99]; | |
} | |
+ | |
+ NSRect viewBounds = [self convertRectToBacking:[self bounds]]; | |
glewInit(); | |
- const char* szTitle = PezInitialize(PEZ_VIEWPORT_WIDTH, PEZ_VIEWPORT_HEIGHT); | |
+ const char* szTitle = PezInitialize(viewBounds.size.width, viewBounds.size.height); | |
m_didInit = YES; | |
[[self window] setLevel: NSFloatingWindowLevel]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The full original library and demos may be found here:
http://prideout.net/blog/p36/