Implement visionOS support

This commit is contained in:
Ravbug authored and Sam Lantinga committed 2023-08-08 22:25:04 -07:00
1 parent e385d6da0a
commit 690eae7d22
15 files changed
+217 -41

No files matched your search

+4
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
}
}