From 69e8be6dc13676ea5217f3bdddcc2c607853119a Mon Sep 17 00:00:00 2001
From: Eric Warmenhoven <eric@warmenhoven.org>
Date: Mon, 6 Jan 2025 20:03:00 -0500
Subject: [PATCH] iOS: ensure webserver notice can be dismissed (#17356)

---
 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 c760fdf2d4..20569fa709 100644
--- a/ui/drivers/cocoa/cocoa_common.m
+++ b/ui/drivers/cocoa/cocoa_common.m
@@ -768,7 +768,6 @@ void cocoa_file_load_with_detect_core(const char *filename);
     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 cocoa_file_load_with_detect_core(const char *filename);
                 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:^{