From 43438fbe1365115f1a4df1a452d14677fca3c86b Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sun, 13 Nov 2016 16:36:18 +0100 Subject: CHEWY: Plug memory leaks --- backends/graphics/surfacesdl/surfacesdl-graphics.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'backends/graphics') diff --git a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp index 21e334d242..6cd5a47e1c 100644 --- a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp +++ b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp @@ -345,7 +345,7 @@ OSystem::TransactionError SurfaceSdlGraphicsManager::endGFXTransaction() { #if SDL_VERSION_ATLEAST(2, 0, 0) } else if (_videoMode.filtering != _oldVideoMode.filtering) { errors |= OSystem::kTransactionFilteringFailed; - + _videoMode.filtering = _oldVideoMode.filtering; #endif #ifdef USE_RGB_COLOR @@ -2350,7 +2350,7 @@ bool SurfaceSdlGraphicsManager::handleScalerHotkeys(Common::KeyCode key) { internUpdateScreen(); return true; } - + #if SDL_VERSION_ATLEAST(2, 0, 0) // Ctrl-Alt-f toggles filtering if (key == 'f') { @@ -2595,7 +2595,7 @@ void SurfaceSdlGraphicsManager::recreateScreenTexture() { return; SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, _videoMode.filtering ? "linear" : "nearest"); - + SDL_Texture *oldTexture = _screenTexture; _screenTexture = SDL_CreateTexture(_renderer, SDL_PIXELFORMAT_RGB565, SDL_TEXTUREACCESS_STREAMING, _videoMode.hardwareWidth, _videoMode.hardwareHeight); if (_screenTexture) @@ -2627,7 +2627,7 @@ SDL_Surface *SurfaceSdlGraphicsManager::SDL_SetVideoMode(int width, int height, SDL_GetWindowSize(_window->getSDLWindow(), &_windowWidth, &_windowHeight); setWindowResolution(_windowWidth, _windowHeight); - + SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, _videoMode.filtering ? "linear" : "nearest"); _screenTexture = SDL_CreateTexture(_renderer, SDL_PIXELFORMAT_RGB565, SDL_TEXTUREACCESS_STREAMING, width, height); -- cgit v1.2.3