+ // Real surface area.
+ unsigned realWidth = IMAGE_WIDTH;
+ unsigned realHeight = IMAGE_HEIGHT;
+ // SDL Window/Surface size (bigger, so we can get mouse events there).
+ unsigned srfWidth, srfHeight;
+
+#ifdef MAEMO
+ if ((Config.fullscreen && !gotScreenSize) ||
+ (!Config.fullscreen && !gotWindowSize)) {
+ // Do a first try, in order to get window/screen size
+ screen = SDL_SetVideoMode(realWidth, realHeight, 16,
+ SDL_SWSURFACE | SDL_RESIZABLE |
+ (Config.fullscreen ? SDL_FULLSCREEN : 0));
+ if (!screen) DIE("SDL_SetVideoMode: %s", SDL_GetError());
+ calculateScreenSize();
+ }
+ if (Config.fullscreen) {
+ srfWidth = screenSize.w;
+ srfHeight = screenSize.h;
+ } else {
+ srfWidth = windowSize.w;
+ srfHeight = windowSize.h;
+ }