Implement visionOS support

This commit is contained in:
Ravbug
2023-07-23 23:11:09 -07:00
committed by Sam Lantinga
parent e385d6da0a
commit 690eae7d22
15 changed files with 217 additions and 41 deletions

View File

@@ -30,9 +30,13 @@ 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
}
}