diff options
author | Tony Puccinelli | 2010-06-05 01:05:19 +0000 |
---|---|---|
committer | Tony Puccinelli | 2010-06-05 01:05:19 +0000 |
commit | 95e56f2052956e80a6319b2916a8f899340effaf (patch) | |
tree | f9525eb32e05f1a4746233fe3daf254d07cb83ab /backends/platform/sdl/sdl.cpp | |
parent | 28e28a2fea9f6adf4967463024c609e6a01ac5b0 (diff) | |
parent | 3a5fe4ca002a85f7c4549c8d36203553553c53f9 (diff) | |
download | scummvm-rg350-95e56f2052956e80a6319b2916a8f899340effaf.tar.gz scummvm-rg350-95e56f2052956e80a6319b2916a8f899340effaf.tar.bz2 scummvm-rg350-95e56f2052956e80a6319b2916a8f899340effaf.zip |
merged trunk into branch and corrected __PS2__ to __PLAYSTATION2__ in a couple files
svn-id: r49435
Diffstat (limited to 'backends/platform/sdl/sdl.cpp')
-rw-r--r-- | backends/platform/sdl/sdl.cpp | 25 |
1 files changed, 4 insertions, 21 deletions
diff --git a/backends/platform/sdl/sdl.cpp b/backends/platform/sdl/sdl.cpp index 6b23acfb8b..e54d70e8b2 100644 --- a/backends/platform/sdl/sdl.cpp +++ b/backends/platform/sdl/sdl.cpp @@ -149,7 +149,6 @@ void OSystem_SDL::initBackend() { memset(&_videoMode, 0, sizeof(_videoMode)); memset(&_transactionDetails, 0, sizeof(_transactionDetails)); - _cksumValid = false; #if !defined(_WIN32_WCE) && !defined(__SYMBIAN32__) && defined(USE_SCALERS) _videoMode.mode = GFX_DOUBLESIZE; _videoMode.scaleFactor = 2; @@ -163,7 +162,6 @@ void OSystem_SDL::initBackend() { _scalerProc = Normal1x; #endif _scalerType = 0; - _modeFlags = 0; #if !defined(_WIN32_WCE) && !defined(__SYMBIAN32__) _videoMode.fullscreen = ConfMan.getBool("fullscreen"); @@ -233,7 +231,7 @@ OSystem_SDL::OSystem_SDL() #endif _overlayVisible(false), _overlayscreen(0), _tmpscreen2(0), - _cdrom(0), _scalerProc(0), _modeChanged(false), _screenChangeCount(0), _dirtyChecksums(0), + _cdrom(0), _scalerProc(0), _modeChanged(false), _screenChangeCount(0), _scrollLock(false), _mouseVisible(false), _mouseNeedsRedraw(false), _mouseData(0), _mouseSurface(0), _mouseOrigSurface(0), _cursorTargetScale(1), _cursorPaletteDisabled(true), @@ -251,9 +249,9 @@ OSystem_SDL::OSystem_SDL() _screenIsLocked(false), _graphicsMutex(0), _transactionMode(kTransactionNone) { - // allocate palette storage - _currentPalette = (SDL_Color *)calloc(sizeof(SDL_Color), 256); - _cursorPalette = (SDL_Color *)calloc(sizeof(SDL_Color), 256); + // clear palette storage + memset(_currentPalette, 0, sizeof(_currentPalette)); + memset(_cursorPalette, 0, sizeof(_cursorPalette)); _mouseBackup.x = _mouseBackup.y = _mouseBackup.w = _mouseBackup.h = 0; @@ -281,9 +279,6 @@ OSystem_SDL::~OSystem_SDL() { SDL_RemoveTimer(_timerID); closeMixer(); - free(_dirtyChecksums); - free(_currentPalette); - free(_cursorPalette); free(_mouseData); delete _savefile; @@ -453,7 +448,6 @@ bool OSystem_SDL::hasFeature(Feature f) { return (f == kFeatureFullscreenMode) || (f == kFeatureAspectRatioCorrection) || - (f == kFeatureAutoComputeDirtyRects) || (f == kFeatureCursorHasPalette) || (f == kFeatureIconifyWindow); } @@ -466,12 +460,6 @@ void OSystem_SDL::setFeatureState(Feature f, bool enable) { case kFeatureAspectRatioCorrection: setAspectRatioCorrection(enable); break; - case kFeatureAutoComputeDirtyRects: - if (enable) - _modeFlags |= DF_WANT_RECT_OPTIM; - else - _modeFlags &= ~DF_WANT_RECT_OPTIM; - break; case kFeatureIconifyWindow: if (enable) SDL_WM_IconifyWindow(); @@ -489,8 +477,6 @@ bool OSystem_SDL::getFeatureState(Feature f) { return _videoMode.fullscreen; case kFeatureAspectRatioCorrection: return _videoMode.aspectRatioCorrection; - case kFeatureAutoComputeDirtyRects: - return _modeFlags & DF_WANT_RECT_OPTIM; default: return false; } @@ -512,9 +498,6 @@ void OSystem_SDL::quit() { SDL_RemoveTimer(_timerID); closeMixer(); - free(_dirtyChecksums); - free(_currentPalette); - free(_cursorPalette); free(_mouseData); delete _timer; |