(svn r18545) -Fix [FS#3292]: Assign '_screen.dst_ptr' as soon as it is allocated.

This commit is contained in:
frosch
2009-12-19 18:46:40 +00:00
parent 7572f95448
commit 29d6491605
6 changed files with 6 additions and 11 deletions

View File

@@ -249,6 +249,7 @@ static bool CreateMainSurface(uint w, uint h)
_screen.width = newscreen->w;
_screen.height = newscreen->h;
_screen.pitch = newscreen->pitch / (bpp / 8);
_screen.dst_ptr = newscreen->pixels;
_sdl_screen = newscreen;
InitPalette();
@@ -587,7 +588,6 @@ void VideoDriver_SDL::MainLoop()
if (_draw_threaded) _draw_mutex->BeginCritical();
_screen.dst_ptr = _sdl_screen->pixels;
UpdateWindows();
if (++pal_tick > 4) {
CheckPaletteAnim();
@@ -599,7 +599,6 @@ void VideoDriver_SDL::MainLoop()
CSleep(1);
if (_draw_threaded) _draw_mutex->BeginCritical();
_screen.dst_ptr = _sdl_screen->pixels;
NetworkDrawChatMessage();
DrawMouseCursor();
}