aboutsummaryrefslogtreecommitdiff
path: root/backends/sdl/sdl.cpp
diff options
context:
space:
mode:
authorMax Horn2004-03-13 14:19:15 +0000
committerMax Horn2004-03-13 14:19:15 +0000
commitd2ef3ad20c80c2f939418a1d917191e9715f46f3 (patch)
treeb2dda5e0758695c3ae3077ca4e8a2506cc6d1994 /backends/sdl/sdl.cpp
parent86df1e876ade4720d5c8ab53f8b54ca26ab7a26d (diff)
downloadscummvm-rg350-d2ef3ad20c80c2f939418a1d917191e9715f46f3.tar.gz
scummvm-rg350-d2ef3ad20c80c2f939418a1d917191e9715f46f3.tar.bz2
scummvm-rg350-d2ef3ad20c80c2f939418a1d917191e9715f46f3.zip
Added an OSD (On Screen Display) to the SDL backend
svn-id: r13248
Diffstat (limited to 'backends/sdl/sdl.cpp')
-rw-r--r--backends/sdl/sdl.cpp23
1 files changed, 21 insertions, 2 deletions
diff --git a/backends/sdl/sdl.cpp b/backends/sdl/sdl.cpp
index 3a32642aae..e87c661c1b 100644
--- a/backends/sdl/sdl.cpp
+++ b/backends/sdl/sdl.cpp
@@ -56,6 +56,8 @@ void OSystem_SDL::init_intern() {
cksum_valid = false;
_mode = GFX_DOUBLESIZE;
+ _scaleFactor = 2;
+ _scaler_proc = Normal2x;
_full_screen = ConfMan.getBool("fullscreen");
_adjustAspectRatio = ConfMan.getBool("aspect_ratio");
_mode_flags = 0;
@@ -74,8 +76,12 @@ void OSystem_SDL::init_intern() {
}
OSystem_SDL::OSystem_SDL()
- : _hwscreen(0), _screen(0), _screenWidth(0), _screenHeight(0),
- _tmpscreen(0), _tmpScreenWidth(0), _overlayVisible(false),
+ :
+#ifdef USE_OSD
+ _osdSurface(0), _osdAlpha(SDL_ALPHA_TRANSPARENT), _osdFadeStartTime(0),
+#endif
+ _hwscreen(0), _screen(0), _screenWidth(0), _screenHeight(0),
+ _tmpscreen(0), _overlayVisible(false),
_cdrom(0), _scaler_proc(0), _modeChanged(false), _dirty_checksums(0),
_mouseVisible(false), _mouseDrawn(false), _mouseData(0),
_mouseHotspotX(0), _mouseHotspotY(0),
@@ -143,6 +149,19 @@ void OSystem_SDL::setFeatureState(Feature f, bool enable) {
//assert(_hwscreen != 0);
_adjustAspectRatio ^= true;
hotswap_gfx_mode();
+
+#ifdef USE_OSD
+ if (_adjustAspectRatio)
+ displayMessageOnOSD("Enabled aspect ratio correction");
+ else
+ displayMessageOnOSD("Disabled aspect ratio correction");
+#endif
+
+ // Blit everything to the screen
+ internUpdateScreen();
+
+ // Make sure that an EVENT_SCREEN_CHANGED gets sent later
+ _modeChanged = true;
}
break;
case kFeatureAutoComputeDirtyRects: