update sdl Merge commit '4d48f9d23713d94b861da7b5d41baf2a41334994'
This commit is contained in:
8
external/sdl/SDL/src/misc/ios/SDL_sysurl.m
vendored
8
external/sdl/SDL/src/misc/ios/SDL_sysurl.m
vendored
@ -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__ */
|
||||
|
4
external/sdl/SDL/src/misc/macos/SDL_sysurl.m
vendored
4
external/sdl/SDL/src/misc/macos/SDL_sysurl.m
vendored
@ -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__ */
|
||||
|
Reference in New Issue
Block a user