Skip to content

Commit

Permalink
Made SDL_GetAndroidSDKVersion() available for applications
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Feb 17, 2020
1 parent 93b26f1 commit d7ece7e
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
26 changes: 26 additions & 0 deletions include/SDL_system.h
Expand Up @@ -120,6 +120,32 @@ extern DECLSPEC void * SDLCALL SDL_AndroidGetJNIEnv(void);
*/
extern DECLSPEC void * SDLCALL SDL_AndroidGetActivity(void);

/**
\brief Return API level of the current device
API level 29: Android 10
API level 28: Android 9
API level 27: Android 8.1
API level 26: Android 8.0
API level 25: Android 7.1
API level 24: Android 7.0
API level 23: Android 6.0
API level 22: Android 5.1
API level 21: Android 5.0
API level 20: Android 4.4W
API level 19: Android 4.4
API level 18: Android 4.3
API level 17: Android 4.2
API level 16: Android 4.1
API level 15: Android 4.0.3
API level 14: Android 4.0
API level 13: Android 3.2
API level 12: Android 3.1
API level 11: Android 3.0
API level 10: Android 2.3.3
*/
extern DECLSPEC int SDLCALL SDL_GetAndroidSDKVersion(void);

/**
\brief Return true if the application is running on Android TV
*/
Expand Down
1 change: 1 addition & 0 deletions src/dynapi/SDL_dynapi_overrides.h
Expand Up @@ -746,3 +746,4 @@
#define SDL_OnApplicationWillEnterForeground SDL_OnApplicationWillEnterForeground_REAL
#define SDL_OnApplicationDidBecomeActive SDL_OnApplicationDidBecomeActive_REAL
#define SDL_OnApplicationDidChangeStatusBarOrientation SDL_OnApplicationDidChangeStatusBarOrientation_REAL
#define SDL_GetAndroidSDKVersion SDL_GetAndroidSDKVersion_REAL
1 change: 1 addition & 0 deletions src/dynapi/SDL_dynapi_procs.h
Expand Up @@ -804,3 +804,4 @@ SDL_DYNAPI_PROC(void,SDL_OnApplicationDidBecomeActive,(void),(),)
#ifdef __IPHONEOS__
SDL_DYNAPI_PROC(void,SDL_OnApplicationDidChangeStatusBarOrientation,(void),(),)
#endif
SDL_DYNAPI_PROC(int,SDL_GetAndroidSDKVersion,(void),(),return)

0 comments on commit d7ece7e

Please sign in to comment.