(cocoa_gl_ctx.m) Cleanups

This commit is contained in:
Twinaphex 2016-01-16 12:12:07 +01:00
parent dfe79c3fcd
commit 2c42ad3c96

View File

@ -388,11 +388,12 @@ static void cocoagl_gfx_ctx_get_video_size(void *data, unsigned* width, unsigned
NSRect backingBounds = [g_view convertRectToBacking:[g_view bounds]];
GLsizei backingPixelWidth = (GLsizei)(backingBounds.size.width),
backingPixelHeight = (GLsizei)(backingBounds.size.height);
size = CGRectMake(0, 0, backingPixelWidth, backingPixelHeight);
#else
CGRect cgrect = NSRectToCGRect([g_view frame]);
size = CGRectMake(0, 0, CGRectGetWidth(cgrect), CGRectGetHeight(cgrect));
GLsizei backingPixelWidth = CGRectGetWidth(cgrect);
GLsizei backingPixelHeight = CGRectGetHeight(cgrect);
#endif
size = CGRectMake(0, 0, backingPixelWidth, backingPixelHeight);
#else
size = g_view.bounds;
#endif