From 869cee64bc9652c12fa74c2c0bc138a7b1fe86bb Mon Sep 17 00:00:00 2001 From: Ilari Liusvaara Date: Wed, 19 Oct 2011 18:24:35 +0300 Subject: [PATCH] Fix wrong offsets in SDL code This is fallout from 16 to 32 bit change. --- SDL/window-sdl.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/SDL/window-sdl.cpp b/SDL/window-sdl.cpp index ea936c50..f9469f32 100644 --- a/SDL/window-sdl.cpp +++ b/SDL/window-sdl.cpp @@ -1288,14 +1288,14 @@ namespace uint32_t ch = current_screen ? current_screen->height : 0; //Blank parts not drawn. for(uint32_t i = 6; i < ch + 6; i++) - memset(reinterpret_cast(swsurf->pixels) + i * swsurf->pitch + 12 + 4 * cw, 0, + memset(reinterpret_cast(swsurf->pixels) + i * swsurf->pitch + 24 + 4 * cw, 0, 4 * (screensize.first - cw)); for(uint32_t i = ch + 6; i < screensize.second + 6; i++) - memset(reinterpret_cast(swsurf->pixels) + i * swsurf->pitch + 12, 0, + memset(reinterpret_cast(swsurf->pixels) + i * swsurf->pitch + 24, 0, 4 * screensize.first); if(current_screen) { for(uint32_t i = 0; i < ch; i++) - memcpy(reinterpret_cast(swsurf->pixels) + (i + 6) * swsurf->pitch + 12, + memcpy(reinterpret_cast(swsurf->pixels) + (i + 6) * swsurf->pitch + 24, reinterpret_cast(current_screen->memory) + current_screen->pitch * i, 4 * cw); }