mirror of
https://github.com/libretro/RetroArch
synced 2025-01-30 21:32:45 +00:00
(Cocoa) See if this works
This commit is contained in:
parent
23bb1414ff
commit
1ddd7ee79d
@ -33,6 +33,12 @@
|
||||
|
||||
static CocoaView* g_instance;
|
||||
|
||||
void *nsview_set_ptr(void *inst)
|
||||
{
|
||||
g_instance = (BRIDGE void*)inst;
|
||||
return (BRIDGE void *)g_instance;
|
||||
}
|
||||
|
||||
void *nsview_get_ptr(void)
|
||||
{
|
||||
#if defined(HAVE_COCOA)
|
||||
@ -75,20 +81,11 @@ void *glkitview_init(void);
|
||||
|
||||
+ (CocoaView*)get
|
||||
{
|
||||
if (!g_instance)
|
||||
g_instance = [CocoaView new];
|
||||
void *inst = nsview_get_ptr();
|
||||
if (!inst)
|
||||
return nsview_set_ptr([CocoaView new]);
|
||||
|
||||
#if defined(HAVE_COCOA)
|
||||
video_driver_display_type_set(RARCH_DISPLAY_OSX);
|
||||
video_driver_display_set(0);
|
||||
video_driver_display_userdata_set((uintptr_t)g_instance);
|
||||
#elif defined(HAVE_COCOA_METAL)
|
||||
video_driver_display_type_set(RARCH_DISPLAY_OSX);
|
||||
video_driver_display_set(0);
|
||||
video_driver_display_userdata_set((uintptr_t)g_instance);
|
||||
#endif
|
||||
|
||||
return g_instance;
|
||||
return inst;
|
||||
}
|
||||
|
||||
- (id)init
|
||||
|
Loading…
x
Reference in New Issue
Block a user