From b1865561c4672a49b042cb186970204645a825d4 Mon Sep 17 00:00:00 2001 From: pelya Date: Tue, 26 Oct 2010 13:36:35 +0300 Subject: [PATCH] Added 640x400 virtual videomode to SDL 1.2 video --- .../sdl-1.2/src/video/android/SDL_androidvideo-1.2.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/project/jni/sdl-1.2/src/video/android/SDL_androidvideo-1.2.c b/project/jni/sdl-1.2/src/video/android/SDL_androidvideo-1.2.c index 7e7b8f028..afd9accea 100644 --- a/project/jni/sdl-1.2/src/video/android/SDL_androidvideo-1.2.c +++ b/project/jni/sdl-1.2/src/video/android/SDL_androidvideo-1.2.c @@ -100,7 +100,7 @@ static void ANDROID_UpdateRects(_THIS, int numrects, SDL_Rect *rects); /* Private display data */ -#define SDL_NUMMODES 4 +#define SDL_NUMMODES 5 static SDL_Rect *SDL_modelist[SDL_NUMMODES+1]; //#define SDL_modelist (this->hidden->SDL_modelist) @@ -224,11 +224,13 @@ int ANDROID_VideoInit(_THIS, SDL_PixelFormat *vformat) SDL_modelist[i]->x = SDL_modelist[i]->y = 0; } /* Modes sorted largest to smallest */ - SDL_modelist[0]->w = SDL_ANDROID_sWindowWidth; SDL_modelist[0]->h = SDL_ANDROID_sWindowHeight; + SDL_modelist[0]->w = SDL_ANDROID_sWindowWidth; + SDL_modelist[0]->h = SDL_ANDROID_sWindowHeight; SDL_modelist[1]->w = 640; SDL_modelist[1]->h = 480; // Will likely be shrinked - SDL_modelist[2]->w = 320; SDL_modelist[2]->h = 240; // Always available on any screen and any orientation - SDL_modelist[3]->w = 320; SDL_modelist[3]->h = 200; // Always available on any screen and any orientation - SDL_modelist[4] = NULL; + SDL_modelist[2]->w = 640; SDL_modelist[2]->h = 400; // Will likely be shrinked + SDL_modelist[3]->w = 320; SDL_modelist[3]->h = 240; // Always available on any screen and any orientation + SDL_modelist[4]->w = 320; SDL_modelist[4]->h = 200; // Always available on any screen and any orientation + SDL_modelist[5] = NULL; SDL_VideoInit_1_3(NULL, 0);