From a321b48c6d55851646ec0d8d9d1b7d3fe8e853c0 Mon Sep 17 00:00:00 2001 From: William McBrine Date: Wed, 11 Jul 2007 21:01:09 +0000 Subject: [PATCH] Handle old pdc_tileback here, so that this function can be called by users. --- sdl1/pdcscrn.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sdl1/pdcscrn.c b/sdl1/pdcscrn.c index 5b7c5215a..7108166e3 100644 --- a/sdl1/pdcscrn.c +++ b/sdl1/pdcscrn.c @@ -13,7 +13,7 @@ #include "pdcsdl.h" -RCSID("$Id: pdcscrn.c,v 1.31 2007/07/09 06:24:42 wmcbrine Exp $") +RCSID("$Id: pdcscrn.c,v 1.32 2007/07/11 21:01:09 wmcbrine Exp $") #include #include "deffont.h" @@ -34,6 +34,9 @@ static struct {short f, b;} atrtab[PDC_COLOR_PAIRS]; void PDC_retile(void) { + if (pdc_tileback) + SDL_FreeSurface(pdc_tileback); + pdc_tileback = SDL_DisplayFormat(pdc_screen); if (pdc_back) @@ -232,10 +235,7 @@ int PDC_resize_screen(int nlines, int ncols) SDL_SWSURFACE|SDL_ANYFORMAT|SDL_RESIZABLE); if (pdc_tileback) - { - SDL_FreeSurface(pdc_tileback); PDC_retile(); - } SP->resized = FALSE; SP->cursrow = SP->curscol = 0;