diff options
author | Johannes Schickel | 2010-10-13 15:43:08 +0000 |
---|---|---|
committer | Johannes Schickel | 2010-10-13 15:43:08 +0000 |
commit | 54f559dc516d8de6ec916176ece4988f55f25d32 (patch) | |
tree | 1dae42f6dcd25aad9395212c0bcc9869ed2761e6 /backends/platform/sdl | |
parent | 34302765caecabf21cc884de95805b3e1d8f8ea1 (diff) | |
download | scummvm-rg350-54f559dc516d8de6ec916176ece4988f55f25d32.tar.gz scummvm-rg350-54f559dc516d8de6ec916176ece4988f55f25d32.tar.bz2 scummvm-rg350-54f559dc516d8de6ec916176ece4988f55f25d32.zip |
OPENGL: Cleanup.
svn-id: r53436
Diffstat (limited to 'backends/platform/sdl')
-rw-r--r-- | backends/platform/sdl/sdl.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/backends/platform/sdl/sdl.cpp b/backends/platform/sdl/sdl.cpp index f3609d8212..5428a791e0 100644 --- a/backends/platform/sdl/sdl.cpp +++ b/backends/platform/sdl/sdl.cpp @@ -226,7 +226,7 @@ void OSystem_SDL::deinit() { _mutexManager = 0; #ifdef USE_OPENGL - free((void *)_graphicsModes), + delete[] _graphicsModes; #endif SDL_Quit(); @@ -388,12 +388,12 @@ void OSystem_SDL::setupGraphicsModes() { } srcMode = openglGraphicsModes; while (srcMode->name) { - _glModesCount ++; + _glModesCount++; srcMode++; } // Allocate enough space for merged array of modes - _graphicsModes = (OSystem::GraphicsMode *)malloc(sizeof(OSystem::GraphicsMode) * (_glModesCount + _sdlModesCount + 1)); + _graphicsModes = new OSystem::GraphicsMode[_glModesCount + _sdlModesCount + 1]; // Copy SDL graphics modes memcpy((void *)_graphicsModes, sdlGraphicsModes, _sdlModesCount * sizeof(OSystem::GraphicsMode)); @@ -406,7 +406,7 @@ void OSystem_SDL::setupGraphicsModes() { // Set new internal ids for all modes int i = 0; - OSystem::GraphicsMode * mode = _graphicsModes; + OSystem::GraphicsMode *mode = _graphicsModes; while (mode->name) { mode->id = i++; mode++; |