diff --git a/desktop_version/src/GraphicsUtil.cpp b/desktop_version/src/GraphicsUtil.cpp index 3bdaadfd..0468d50c 100644 --- a/desktop_version/src/GraphicsUtil.cpp +++ b/desktop_version/src/GraphicsUtil.cpp @@ -166,16 +166,7 @@ SDL_Surface * ScaleSurface( SDL_Surface *_surface, int Width, int Height, SDL_Su _ret = Dest; } - float _stretch_factor_x = (static_cast(Width) / static_cast(_surface->w)), _stretch_factor_y = (static_cast(Height) / static_cast(_surface->h)); - - - SDL_Rect gigantoPixel; - for(Sint32 y = 0; y < _surface->h; y++) - for(Sint32 x = 0; x < _surface->w; x++) - { - setRect(gigantoPixel, static_cast(float(x)*_stretch_factor_x), static_cast(float(y) *_stretch_factor_y), static_cast(_stretch_factor_x),static_cast( _stretch_factor_y)) ; - SDL_FillRect(_ret, &gigantoPixel, ReadPixel(_surface, x, y)); - } + SDL_BlitScaled(_surface, NULL, _ret, NULL); return _ret; }