mirror of
https://github.com/libretro/RetroArch
synced 2025-04-10 06:44:27 +00:00
add the metal view to the view controller view after initializing the metal view for iOS
This commit is contained in:
parent
8e1dd5def1
commit
82d6d8e876
@ -102,7 +102,7 @@ void *nsview_get_ptr(void)
|
|||||||
video_driver_display_type_set(RARCH_DISPLAY_OSX);
|
video_driver_display_type_set(RARCH_DISPLAY_OSX);
|
||||||
video_driver_display_set(0);
|
video_driver_display_set(0);
|
||||||
video_driver_display_userdata_set((uintptr_t)g_instance);
|
video_driver_display_userdata_set((uintptr_t)g_instance);
|
||||||
#elif defined(HAVE_COCOA_METAL)
|
#elif defined(HAVE_COCOA_METAL) && !defined(HAVE_COCOATOUCH)
|
||||||
video_driver_display_type_set(RARCH_DISPLAY_OSX);
|
video_driver_display_type_set(RARCH_DISPLAY_OSX);
|
||||||
video_driver_display_set(0);
|
video_driver_display_set(0);
|
||||||
video_driver_display_userdata_set((uintptr_t)g_instance);
|
video_driver_display_userdata_set((uintptr_t)g_instance);
|
||||||
|
@ -29,6 +29,9 @@
|
|||||||
#ifdef HAVE_COCOATOUCH
|
#ifdef HAVE_COCOATOUCH
|
||||||
#import "GCDWebUploader.h"
|
#import "GCDWebUploader.h"
|
||||||
#import "WebServer.h"
|
#import "WebServer.h"
|
||||||
|
#ifdef HAVE_COCOA_METAL
|
||||||
|
#include "apple_platform.h"
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@ -86,7 +89,11 @@ void *glkitview_init(void);
|
|||||||
#elif !defined(HAVE_COCOATOUCH) && defined(HAVE_COCOA_METAL)
|
#elif !defined(HAVE_COCOATOUCH) && defined(HAVE_COCOA_METAL)
|
||||||
[self registerForDraggedTypes:@[NSColorPboardType, NSFilenamesPboardType]];
|
[self registerForDraggedTypes:@[NSColorPboardType, NSFilenamesPboardType]];
|
||||||
#elif defined(HAVE_COCOATOUCH)
|
#elif defined(HAVE_COCOATOUCH)
|
||||||
|
#if defined(HAVE_COCOA_METAL)
|
||||||
|
self.view = [UIView new];
|
||||||
|
#else
|
||||||
self.view = (BRIDGE GLKView*)glkitview_init();
|
self.view = (BRIDGE GLKView*)glkitview_init();
|
||||||
|
#endif
|
||||||
#if TARGET_OS_IOS
|
#if TARGET_OS_IOS
|
||||||
UISwipeGestureRecognizer *swipe = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(showNativeMenu)];
|
UISwipeGestureRecognizer *swipe = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(showNativeMenu)];
|
||||||
swipe.numberOfTouchesRequired = 4;
|
swipe.numberOfTouchesRequired = 4;
|
||||||
|
@ -366,8 +366,9 @@ enum
|
|||||||
|
|
||||||
// _renderView.autoresizingMask = NSViewWidthSizable | NSViewHeightSizable;
|
// _renderView.autoresizingMask = NSViewWidthSizable | NSViewHeightSizable;
|
||||||
[_renderView setFrame:self.window.bounds];
|
[_renderView setFrame:self.window.bounds];
|
||||||
|
[[CocoaView get].view addSubview:_renderView];
|
||||||
|
|
||||||
[self.window addSubview:_renderView];
|
// [self.window addSubview:_renderView];
|
||||||
// self.window.contentView.nextResponder = _listener;
|
// self.window.contentView.nextResponder = _listener;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user