mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-08-18 17:57:55 +08:00
Simplify SDL_IsPhone (#16080)
This commit is contained in:
@@ -848,13 +848,7 @@ const char *SDL_GetPlatform(void)
|
||||
|
||||
bool SDL_IsPhone(void)
|
||||
{
|
||||
#if defined(SDL_PLATFORM_ANDROID) || \
|
||||
(defined(SDL_PLATFORM_IOS) && !defined(SDL_PLATFORM_VISIONOS))
|
||||
if (!SDL_IsTablet() && !SDL_IsTV()) {
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
return false;
|
||||
return SDL_GetDeviceFormFactor() == SDL_FORMFACTOR_PHONE;
|
||||
}
|
||||
|
||||
bool SDL_IsTablet(void)
|
||||
|
||||
Reference in New Issue
Block a user