mirror of
https://github.com/libretro/RetroArch
synced 2025-04-07 13:23:32 +00:00
webServerDidCompleteBonjourRegistration - cleanup some code
duplication
This commit is contained in:
parent
f8b4477b9a
commit
4c1c0cc80d
@ -271,8 +271,6 @@ void *glkitview_init(void);
|
|||||||
#if TARGET_OS_IOS
|
#if TARGET_OS_IOS
|
||||||
if (@available(iOS 11.0, *))
|
if (@available(iOS 11.0, *))
|
||||||
[self setNeedsUpdateOfHomeIndicatorAutoHidden];
|
[self setNeedsUpdateOfHomeIndicatorAutoHidden];
|
||||||
#elif TARGET_OS_TV
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -295,18 +293,19 @@ void *glkitview_init(void);
|
|||||||
[servers appendString:@"\n\n"];
|
[servers appendString:@"\n\n"];
|
||||||
if (server.bonjourServerURL != nil)
|
if (server.bonjourServerURL != nil)
|
||||||
[servers appendString:[NSString stringWithFormat:@"%@",server.bonjourServerURL]];
|
[servers appendString:[NSString stringWithFormat:@"%@",server.bonjourServerURL]];
|
||||||
|
|
||||||
|
#if TARGET_OS_TV || TARGET_OS_IOS
|
||||||
|
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
|
#if TARGET_OS_TV
|
||||||
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];
|
[alert addAction:[UIAlertAction actionWithTitle:@"OK"
|
||||||
[alert addAction:[UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
|
style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
|
||||||
}]];
|
}]];
|
||||||
[self presentViewController:alert animated:YES completion:^{
|
|
||||||
}];
|
|
||||||
#elif TARGET_OS_IOS
|
#elif TARGET_OS_IOS
|
||||||
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];
|
|
||||||
[alert addAction:[UIAlertAction actionWithTitle:@"Stop Server" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
|
[alert addAction:[UIAlertAction actionWithTitle:@"Stop Server" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
|
||||||
[[WebServer sharedInstance] webUploader].delegate = nil;
|
[[WebServer sharedInstance] webUploader].delegate = nil;
|
||||||
[[WebServer sharedInstance] stopUploader];
|
[[WebServer sharedInstance] stopUploader];
|
||||||
}]];
|
}]];
|
||||||
|
#endif
|
||||||
[self presentViewController:alert animated:YES completion:^{
|
[self presentViewController:alert animated:YES completion:^{
|
||||||
}];
|
}];
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user