From a681ebad7d4cdb83e976d1afd383ad6c42a04221 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sat, 3 Jun 2006 01:05:09 +0000 Subject: More maemo port development svn-id: r22849 --- backends/sdl/graphics.cpp | 14 ++++++++++++-- backends/sdl/sdl.cpp | 2 +- 2 files changed, 13 insertions(+), 3 deletions(-) (limited to 'backends/sdl') diff --git a/backends/sdl/graphics.cpp b/backends/sdl/graphics.cpp index 05bf1bc0e0..a14fa9e109 100644 --- a/backends/sdl/graphics.cpp +++ b/backends/sdl/graphics.cpp @@ -310,6 +310,9 @@ void OSystem_SDL::loadGFXMode() { _forceFull = true; _modeFlags |= DF_UPDATE_EXPAND_1_PIXEL; + int hwW, hwH; + +#ifndef __MAEMO__ _overlayWidth = _screenWidth * _scaleFactor; _overlayHeight = _screenHeight * _scaleFactor; @@ -319,6 +322,13 @@ void OSystem_SDL::loadGFXMode() { if (_adjustAspectRatio) _overlayHeight = real2Aspect(_overlayHeight); + hwW = _screenWidth * _scaleFactor; + hwH = effectiveScreenHeight(); +#else + hwW = _overlayWidth; + hwH = _overlayHeight; +#endif + // // Create the surface that contains the 8 bit game data // @@ -330,7 +340,7 @@ void OSystem_SDL::loadGFXMode() { // Create the surface that contains the scaled graphics in 16 bit mode // - _hwscreen = SDL_SetVideoMode(_screenWidth * _scaleFactor, effectiveScreenHeight(), 16, + _hwscreen = SDL_SetVideoMode(hwW, hwH, 16, _fullscreen ? (SDL_FULLSCREEN|SDL_SWSURFACE) : SDL_SWSURFACE ); if (_hwscreen == NULL) { @@ -703,7 +713,7 @@ void OSystem_SDL::setFullscreenMode(bool enable) { return; } -#if defined(MACOSX) && !SDL_VERSION_ATLEAST(1, 2, 6) +#if (defined(MACOSX) && !SDL_VERSION_ATLEAST(1, 2, 6)) || defined(__MAEMO__) // On OS X, SDL_WM_ToggleFullScreen is currently not implemented. Worse, // before SDL 1.2.6 it always returned -1 (which would indicate a // successful switch). So we simply don't call it at all and use diff --git a/backends/sdl/sdl.cpp b/backends/sdl/sdl.cpp index 274ebec193..dce70bc780 100644 --- a/backends/sdl/sdl.cpp +++ b/backends/sdl/sdl.cpp @@ -144,7 +144,7 @@ void OSystem_SDL::initBackend() { _scaleFactor = 1; _scalerProc = Normal1x; -#if !defined(_WIN32_WCE) && !defined(__SYMBIAN32__) && !defined(__MAEMO__) +#if !defined(_WIN32_WCE) && !defined(__SYMBIAN32__) _fullscreen = ConfMan.getBool("fullscreen"); #else _fullscreen = true; -- cgit v1.2.3