(Cocoa) It's only necessary to set the display server userdata for

set_video_mode
This commit is contained in:
Twinaphex 2019-09-22 11:29:58 +02:00
parent 511f43d5cf
commit 2414224df8

View File

@ -249,7 +249,7 @@ float get_backing_scale_factor(void)
#if defined(HAVE_COCOA_METAL)
NSView *g_view = apple_platform.renderView;
#elif defined(HAVE_COCOA)
CocoaView *g_view = (CocoaView*)nsview_get_ptr();
CocoaView *g_view = g_instance;
#endif
backing_scale_def = (float)get_from_selector
([[g_view window] class], [g_view window], selector, &ret);
@ -485,7 +485,7 @@ static void cocoagl_gfx_ctx_get_video_size(void *data, unsigned* width, unsigned
#if defined(HAVE_COCOA_METAL)
NSView *g_view = apple_platform.renderView;
#elif defined(HAVE_COCOA)
CocoaView *g_view = (CocoaView*)nsview_get_ptr();
CocoaView *g_view = g_instance;
#endif
CGRect cgrect = NSRectToCGRect([g_view frame]);
#if MAC_OS_X_VERSION_10_7