This commit is contained in:
twinaphex 2016-01-16 13:29:33 +01:00
parent 9a38ec28b0
commit 14ec006412

View File

@ -382,8 +382,8 @@ static void cocoagl_gfx_ctx_get_video_size(void *data, unsigned* width, unsigned
CocoaView *g_view = (CocoaView*)nsview_get_ptr();
#if MAC_OS_X_VERSION_10_7
NSRect backingBounds = [g_view convertRectToBacking:[g_view bounds]];
GLsizei backingPixelWidth = (GLsizei)(backingBounds.size.width),
backingPixelHeight = (GLsizei)(backingBounds.size.height);
GLsizei backingPixelWidth = (GLsizei)(backingBounds.size.width);
GLsizei backingPixelHeight = (GLsizei)(backingBounds.size.height);
#else
CGRect cgrect = NSRectToCGRect([g_view frame]);
GLsizei backingPixelWidth = CGRectGetWidth(cgrect);
@ -393,7 +393,6 @@ static void cocoagl_gfx_ctx_get_video_size(void *data, unsigned* width, unsigned
#else
size = g_view.bounds;
#endif
*width = CGRectGetWidth(size) * screenscale;
*height = CGRectGetHeight(size) * screenscale;
}