libfreerdp-gdi: fix small bug in region invalidation

This commit is contained in:
Marc-André Moreau 2011-08-24 22:27:59 -04:00
parent 8f566e9268
commit 031c7b4f4f
2 changed files with 3 additions and 1 deletions

View File

@ -958,6 +958,8 @@ int gdi_init(freerdp* instance, uint32 flags)
gdi->primary->hdc->hwnd = (HGDI_WND) malloc(sizeof(GDI_WND));
gdi->primary->hdc->hwnd->invalid = gdi_CreateRectRgn(0, 0, 0, 0);
gdi->primary->hdc->hwnd->invalid->null = 1;
gdi->primary->hdc->hwnd->cinvalid = NULL;
gdi->primary->hdc->hwnd->ninvalid = 0;
gdi->tile = gdi_bitmap_new(gdi, 64, 64, 32, NULL);

View File

@ -384,7 +384,7 @@ inline int gdi_InvalidateRegion(HGDI_DC hdc, int x, int y, int w, int h)
cinvalid = hdc->hwnd->cinvalid;
if (hdc->hwnd->ninvalid < 1)
if (hdc->hwnd->ninvalid <= 0)
{
hdc->hwnd->ninvalid = 0;
cinvalid = (HGDI_RGN*) malloc(sizeof(HGDI_RGN));