update sdl Merge commit '4d48f9d23713d94b861da7b5d41baf2a41334994'

This commit is contained in:
2023-08-12 20:17:29 +02:00
215 changed files with 12672 additions and 17114 deletions

View File

@ -20,6 +20,8 @@
*/
#include "SDL_internal.h"
#if defined(__IOS__) || defined(__TVOS__)
#include "../SDL_sysurl.h"
#import <UIKit/UIKit.h>
@ -28,8 +30,14 @@ int SDL_SYS_OpenURL(const char *url)
{
@autoreleasepool {
#if TARGET_OS_XR
return SDL_Unsupported(); // openURL is not suported on visionOS
#else
NSString *nsstr = [NSString stringWithUTF8String:url];
NSURL *nsurl = [NSURL URLWithString:nsstr];
return [[UIApplication sharedApplication] openURL:nsurl] ? 0 : -1;
#endif
}
}
#endif /* __IOS__ || __TVOS__ */

View File

@ -20,6 +20,8 @@
*/
#include "SDL_internal.h"
#if defined(__MACOS__)
#include "../SDL_sysurl.h"
#import <Cocoa/Cocoa.h>
@ -33,3 +35,5 @@ int SDL_SYS_OpenURL(const char *url)
return status == noErr ? 0 : -1;
}
}
#endif /* __MACOS__ */