Re-apply custom 4x3 screen aspect ratio when app raised up from background

This commit is contained in:
pelya
2010-11-22 15:12:17 +02:00
parent ffbbbb6cad
commit 828a99e49b

View File

@@ -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