Add SDL_IsTV() (#11004)

Moved SDL_IsAndroidTV() out of public API, to match SDL_IsAndroidTablet().

Added SDL_IsTV(), to mirror existing SDL_IsTablet().
This commit is contained in:
Anthony
2024-10-01 17:20:00 +01:00
committed by GitHub
parent 6bcf2f919a
commit 5f5379dc99
9 changed files with 41 additions and 20 deletions

View File

@@ -297,7 +297,7 @@ void SDL_NSLog(const char *prefix, const char *text)
#endif // SDL_VIDEO_DRIVER_COCOA
/*
* iOS Tablet detection
* iOS Tablet, etc, detection
*
* This doesn't really have anything to do with the interfaces of the SDL video
* subsystem, but we need to stuff this into an Objective-C source code file.
@@ -307,4 +307,9 @@ bool SDL_IsIPad(void)
return ([UIDevice currentDevice].userInterfaceIdiom == UIUserInterfaceIdiomPad);
}
bool SDL_IsAppleTV(void)
{
return ([UIDevice currentDevice].userInterfaceIdiom == UIUserInterfaceIdiomTV);
}
#endif // SDL_VIDEO_DRIVER_UIKIT