mirror of
https://github.com/libretro/RetroArch
synced 2025-01-31 06:32:48 +00:00
(iOS) Cleanups
This commit is contained in:
parent
82c751ead0
commit
f6d35ee462
@ -105,7 +105,7 @@ static CocoaView* g_instance;
|
||||
|
||||
void *nsview_get_ptr(void)
|
||||
{
|
||||
#if defined(HAVE_COCOA) || (defined(HAVE_COCOA_METAL) && !defined(HAVE_COCOATOUCH))
|
||||
#if defined(OSX)
|
||||
video_driver_display_type_set(RARCH_DISPLAY_OSX);
|
||||
video_driver_display_set(0);
|
||||
video_driver_display_userdata_set((uintptr_t)g_instance);
|
||||
@ -115,7 +115,6 @@ void *nsview_get_ptr(void)
|
||||
|
||||
void nsview_set_ptr(CocoaView *p) { g_instance = p; }
|
||||
|
||||
|
||||
static uint32_t cocoagl_gfx_ctx_get_flags(void *data)
|
||||
{
|
||||
uint32_t flags = 0;
|
||||
@ -166,28 +165,26 @@ static void cocoagl_gfx_ctx_set_flags(void *data, uint32_t flags)
|
||||
cocoa_ctx->core_hw_context_enable = true;
|
||||
}
|
||||
|
||||
#if !defined(OSX)
|
||||
#if defined(HAVE_COCOATOUCH)
|
||||
void *glkitview_init(void)
|
||||
{
|
||||
#if defined(HAVE_COCOATOUCH)
|
||||
g_view = [GLKView new];
|
||||
g_view = [GLKView new];
|
||||
#if TARGET_OS_IOS
|
||||
g_view.multipleTouchEnabled = YES;
|
||||
#endif
|
||||
g_view.enableSetNeedsDisplay = NO;
|
||||
|
||||
return (BRIDGE void *)((GLKView*)g_view);
|
||||
#else
|
||||
return nsview_get_ptr();
|
||||
#endif
|
||||
}
|
||||
|
||||
#if defined(HAVE_COCOATOUCH)
|
||||
void cocoagl_bind_game_view_fbo(void)
|
||||
{
|
||||
if (g_context)
|
||||
[g_view bindDrawable];
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
void *get_chosen_screen(void)
|
||||
{
|
||||
|
@ -31,9 +31,10 @@
|
||||
|
||||
/* forward declarations */
|
||||
void cocoagl_gfx_ctx_update(void);
|
||||
void *glkitview_init(void);
|
||||
|
||||
#ifdef HAVE_COCOATOUCH
|
||||
void *glkitview_init(void);
|
||||
|
||||
@interface CocoaView()<GCDWebUploaderDelegate> {
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user