From f7ae8001ad99c33cae7ff28263a02e2c766d44db Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 14 Sep 2020 21:54:46 +0200 Subject: [PATCH] Cleanups --- ui/drivers/ui_cocoatouch.m | 33 +++++++++++++++------------------ 1 file changed, 15 insertions(+), 18 deletions(-) diff --git a/ui/drivers/ui_cocoatouch.m b/ui/drivers/ui_cocoatouch.m index 54e092e85e..fc9eb9c65d 100644 --- a/ui/drivers/ui_cocoatouch.m +++ b/ui/drivers/ui_cocoatouch.m @@ -328,8 +328,6 @@ enum if (vt == _vt) return; - RARCH_LOG("[Cocoa]: change view type: %d ? %d\n", _vt, vt); - _vt = vt; if (_renderView != nil) { @@ -337,29 +335,28 @@ enum _renderView = nil; } - switch (vt) { + switch (vt) + { #ifdef HAVE_COCOA_METAL case APPLE_VIEW_TYPE_VULKAN: - case APPLE_VIEW_TYPE_METAL: - { - MetalView *v = [MetalView new]; - v.paused = YES; - v.enableSetNeedsDisplay = NO; + case APPLE_VIEW_TYPE_METAL: + { + MetalView *v = [MetalView new]; + v.paused = YES; + v.enableSetNeedsDisplay = NO; #if TARGET_OS_IOS - v.multipleTouchEnabled = YES; + v.multipleTouchEnabled = YES; #endif - _renderView = v; - } - break; + _renderView = v; + } + break; #endif - case APPLE_VIEW_TYPE_OPENGL_ES: - { + case APPLE_VIEW_TYPE_OPENGL_ES: _renderView = (BRIDGE GLKView*)glkitview_init(); break; - } - case APPLE_VIEW_TYPE_NONE: - default: + case APPLE_VIEW_TYPE_NONE: + default: return; } @@ -418,6 +415,7 @@ enum - (void)applicationDidFinishLaunching:(UIApplication *)application { + NSError *error; char arguments[] = "retroarch"; char *argv[] = {arguments, NULL}; int argc = 1; @@ -429,7 +427,6 @@ enum self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; [self.window makeKeyAndVisible]; - NSError *error; [[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryAmbient error:&error]; if (error) { NSLog(@"Could not set audio session category: %@",error.localizedDescription);