From 70eba7bbe41ccdaef130734503e1feff93078785 Mon Sep 17 00:00:00 2001 From: Eric Warmenhoven Date: Mon, 6 Jan 2025 16:29:50 -0500 Subject: [PATCH] iOS: ensure webserver notice can be dismissed --- ui/drivers/cocoa/cocoa_common.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/drivers/cocoa/cocoa_common.m b/ui/drivers/cocoa/cocoa_common.m index c760fdf2d4ec..20569fa70930 100644 --- a/ui/drivers/cocoa/cocoa_common.m +++ b/ui/drivers/cocoa/cocoa_common.m @@ -768,7 +768,6 @@ - (void)webServerDidCompleteBonjourRegistration:(GCDWebServer*)server static dispatch_once_t onceToken; dispatch_once(&onceToken, ^{ UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"Welcome to RetroArch" message:[NSString stringWithFormat:@"To transfer files from your computer, go to one of these addresses on your web browser:\n\n%@",servers] preferredStyle:UIAlertControllerStyleAlert]; -#if TARGET_OS_TV [alert addAction:[UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) { rarch_start_draw_observer(); @@ -778,10 +777,11 @@ - (void)webServerDidCompleteBonjourRegistration:(GCDWebServer*)server rarch_start_draw_observer(); configuration_set_bool(settings, settings->bools.gcdwebserver_alert, false); }]]; -#elif TARGET_OS_IOS +#if TARGET_OS_IOS [alert addAction:[UIAlertAction actionWithTitle:@"Stop Server" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) { [[WebServer sharedInstance] webUploader].delegate = nil; [[WebServer sharedInstance] stopServers]; + rarch_start_draw_observer(); }]]; #endif [self presentViewController:alert animated:YES completion:^{