Fixed bug 1600 - SDL_GetPlatform() returns "unknown os" on Android
authorSam Lantinga <slouken@libsdl.org>
Wed, 19 Sep 2012 18:08:37 -0700
changeset 6441ada3545fed23
parent 6440 f0ca76958984
child 6442 2d3caa191dc4
Fixed bug 1600 - SDL_GetPlatform() returns "unknown os" on Android

Pallav Nawani 2012-09-14 03:23:02 PDT

Looking through the code for SDL_GetPlatform(), it is obvious that the case for
Android platform doesn't exist. And hence SDL_GetPlatform() doesn't return a
useful string on Android Phones.
src/SDL.c
     1.1 --- a/src/SDL.c	Tue Sep 18 23:13:35 2012 -0700
     1.2 +++ b/src/SDL.c	Wed Sep 19 18:08:37 2012 -0700
     1.3 @@ -248,6 +248,8 @@
     1.4  {
     1.5  #if __AIX__
     1.6      return "AIX";
     1.7 +#elif __ANDROID__
     1.8 +    return "Android";
     1.9  #elif __HAIKU__
    1.10  /* Haiku must appear here before BeOS, since it also defines __BEOS__ */
    1.11      return "Haiku";