src/video/android/SDL_androidvideo.c
changeset 4716 f2c2a33a1a38
parent 4713 ba38983b10c2
child 4960 0ab2492f2e17
--- a/src/video/android/SDL_androidvideo.c	Tue Jul 27 10:20:22 2010 +0200
+++ b/src/video/android/SDL_androidvideo.c	Tue Jul 27 10:49:11 2010 +0200
@@ -57,6 +57,12 @@
 /* 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;
+
+
 static int
 Android_Available(void)
 {
@@ -120,8 +126,8 @@
 
     /* Use a fake 32-bpp desktop mode */
     mode.format = SDL_PIXELFORMAT_RGB888;
-    mode.w = 320;
-    mode.h = 480;
+    mode.w = iScreenWidth;
+    mode.h = iScreenHeight;
     mode.refresh_rate = 0;
     mode.driverdata = NULL;
     if (SDL_AddBasicVideoDisplay(&mode) < 0) {
@@ -150,5 +156,11 @@
 }
 
 
+void Android_SetScreenResolution(int width, int height){
+    iScreenWidth = width;
+    iScreenHeight = height;   
+}
+
+
 
 /* vi: set ts=4 sw=4 expandtab: */