Moved SDL_IsTablet() to a cross-platform API function

This commit is contained in:
Sam Lantinga
2018-08-21 20:03:54 -07:00
parent e9f6805fc6
commit 6f758ad25f
6 changed files with 34 additions and 26 deletions

View File

@@ -475,6 +475,20 @@ SDL_GetPlatform()
#endif
}
SDL_bool
SDL_IsTablet()
{
#if __ANDROID__
extern SDL_bool SDL_IsAndroidTablet(void);
return SDL_IsAndroidTablet();
#elif __IPHONEOS__
extern SDL_bool SDL_IsIPad(void);
return SDL_IsIPad();
#else
return SDL_FALSE;
#endif
}
#if defined(__WIN32__)
#if (!defined(HAVE_LIBC) || defined(__WATCOMC__)) && !defined(SDL_STATIC_LIB)