From 828a99e49b356887e283f89c8f3a441bdc6f9fdd Mon Sep 17 00:00:00 2001 From: pelya Date: Mon, 22 Nov 2010 15:12:17 +0200 Subject: [PATCH] Re-apply custom 4x3 screen aspect ratio when app raised up from background --- project/jni/sdl-1.2/src/video/android/SDL_androidvideo-1.2.c | 3 +++ 1 file changed, 3 insertions(+) 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 6242dda12..b53d7eb00 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 @@ -879,6 +879,9 @@ void SDL_ANDROID_VideoContextRecreated() { int i; SDL_SelectRenderer(SDL_VideoWindow); // Re-apply glOrtho() and blend modes + // Re-apply our custom 4:3 screen aspect ratio + glViewport(0, 0, SDL_ANDROID_sRealWindowWidth, SDL_ANDROID_sRealWindowHeight); + glOrthof(0.0, (GLfloat) SDL_ANDROID_sWindowWidth, (GLfloat) SDL_ANDROID_sWindowHeight, 0.0, 0.0, 1.0); for( i = 0; i < HwSurfaceCount; i++ ) { // Allocate HW texture