Mercurial > sdl-ios-xcode
diff src/video/android/SDL_androidvideo.c @ 4981:55b82067815b
Fill in the video mode with the correct screen format
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Wed, 12 Jan 2011 14:29:01 -0800 |
parents | d9fdff945ec9 |
children | a514bfe6952a |
line wrap: on
line diff
--- a/src/video/android/SDL_androidvideo.c Wed Jan 12 13:52:41 2011 -0800 +++ b/src/video/android/SDL_androidvideo.c Wed Jan 12 14:29:01 2011 -0800 @@ -56,10 +56,11 @@ /* Android driver bootstrap functions */ -//These are filled in with real values in Android_SetScreenResolution on -//init (before SDL_Main()) -static int iScreenWidth = 320; -static int iScreenHeight = 240; +// These are filled in with real values in Android_SetScreenResolution on +// init (before SDL_main()) +static Uint32 iScreenFormat = SDL_PIXELFORMAT_UNKNOWN; +static int iScreenWidth = 0; +static int iScreenHeight = 0; static int @@ -122,8 +123,7 @@ { SDL_DisplayMode mode; - /* Use a fake 32-bpp desktop mode */ - mode.format = SDL_PIXELFORMAT_BGR888; + mode.format = iScreenFormat; mode.w = iScreenWidth; mode.h = iScreenHeight; mode.refresh_rate = 0; @@ -146,11 +146,12 @@ { } - -void Android_SetScreenResolution(int width, int height){ +void +Android_SetScreenResolution(int width, int height, Uint32 format) +{ iScreenWidth = width; iScreenHeight = height; + iScreenFormat = format; } - /* vi: set ts=4 sw=4 expandtab: */