aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
Diffstat (limited to 'backends')
-rw-r--r--backends/graphics/surfacesdl/surfacesdl-graphics.cpp27
1 files changed, 1 insertions, 26 deletions
diff --git a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
index 21a8265d8c..bb7221da4b 100644
--- a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
+++ b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
@@ -106,10 +106,6 @@ static const int s_gfxModeSwitchTable[][4] = {
{ GFX_NORMAL, GFX_DOTMATRIX, -1, -1 }
};
-#ifdef USE_SCALERS
-static int cursorStretch200To240(uint8 *buf, uint32 pitch, int width, int height, int srcX, int srcY, int origSrcY);
-#endif
-
AspectRatio::AspectRatio(int w, int h) {
// TODO : Validation and so on...
// Currently, we just ensure the program don't instantiate non-supported aspect ratios
@@ -2224,34 +2220,13 @@ void SurfaceSdlGraphicsManager::blitCursor() {
#ifdef USE_SCALERS
if (!_cursorDontScale && _videoMode.aspectRatioCorrection)
- cursorStretch200To240((uint8 *)_mouseSurface->pixels, _mouseSurface->pitch, rW, rH1, 0, 0, 0);
+ stretch200To240Nearest((uint8 *)_mouseSurface->pixels, _mouseSurface->pitch, rW, rH1, 0, 0, 0);
#endif
SDL_UnlockSurface(_mouseSurface);
SDL_UnlockSurface(_mouseOrigSurface);
}
-#ifdef USE_SCALERS
-// Basically it is stretch200To240Nearest from common/scale/aspect.cpp
-static int cursorStretch200To240(uint8 *buf, uint32 pitch, int width, int height, int srcX, int srcY, int origSrcY) {
- int maxDstY = real2Aspect(origSrcY + height - 1);
- int y;
- const uint8 *startSrcPtr = buf + srcX * 2 + (srcY - origSrcY) * pitch;
- uint8 *dstPtr = buf + srcX * 2 + maxDstY * pitch;
-
- for (y = maxDstY; y >= srcY; y--) {
- const uint8 *srcPtr = startSrcPtr + aspect2Real(y) * pitch;
-
- if (srcPtr == dstPtr)
- break;
- memcpy(dstPtr, srcPtr, width * 2);
- dstPtr -= pitch;
- }
-
- return 1 + maxDstY - srcY;
-}
-#endif
-
void SurfaceSdlGraphicsManager::undrawMouse() {
const int x = _mouseBackup.x;
const int y = _mouseBackup.y;