mirror of
https://github.com/VARCem/PDCurses.git
synced 2026-09-25 00:05:16 +00:00
SDL_Flip() can be faster when there are a large number of rectangles...
mostly this will be when rectcount is about to overflow. The existing mechanism is clearly faster in many circumstances, and, I think, in most that will be encountered in real applications. But it's a complex issue.
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
|
||||
#include "pdcsdl.h"
|
||||
|
||||
RCSID("$Id: pdcdisp.c,v 1.18 2007/06/19 01:49:02 wmcbrine Exp $")
|
||||
RCSID("$Id: pdcdisp.c,v 1.19 2007/06/19 05:09:27 wmcbrine Exp $")
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@@ -69,7 +69,11 @@ void PDC_update_rects(void)
|
||||
{
|
||||
if (rectcount)
|
||||
{
|
||||
SDL_UpdateRects(pdc_screen, rectcount, uprect);
|
||||
if (rectcount == MAXRECT)
|
||||
SDL_Flip(pdc_screen);
|
||||
else
|
||||
SDL_UpdateRects(pdc_screen, rectcount, uprect);
|
||||
|
||||
rectcount = 0;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user