From d7439be3206265400df7fcaca43e316a4e544bee Mon Sep 17 00:00:00 2001 From: Amy Bowersox Date: Wed, 11 Dec 2019 11:09:40 -0700 Subject: [PATCH] still plugging away at errors --- src/dc_screen.c | 6 ++++-- src/devctxt.c | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/dc_screen.c b/src/dc_screen.c index e6f5149..d248013 100755 --- a/src/dc_screen.c +++ b/src/dc_screen.c @@ -1,4 +1,5 @@ #include +#inlcude #include "log.h" #include "fbinit.h" #include "devctxt.h" @@ -160,7 +161,7 @@ static BOOL screen_solid_rect(PVOID privdata, PRECT rect, COLORREF color, INT32 PUINT16 ps, p; int y, x; - ps = loc_from_coords(rect->left, rect->top); + ps = loc_from_coords(priv, rect->left, rect->top); for (y = rect->top; y < rect->bottom; y++) { p = ps; @@ -178,6 +179,7 @@ static PDCTXT screen_create_compat(PVOID privdata) { PSCREENPRIVDATA priv_new; PBITMAP pbmp; + PDCTXT rc; pbmp = BMP_Create(1, 1, NULL); if (!pbmp) @@ -204,7 +206,7 @@ static PDCTXT screen_create_compat(PVOID privdata) } else { - free(priv); + free(priv_new); Go_release(&(pbmp->hdr)); } return rc; diff --git a/src/devctxt.c b/src/devctxt.c index 2830f13..217a0e3 100755 --- a/src/devctxt.c +++ b/src/devctxt.c @@ -218,7 +218,7 @@ PGFXOBJECT DC_SelectObject(PDCTXT pdctxt, PGFXOBJECT pobj) pdctxt->baserect.left = pdctxt->baserect.top = 0; pdctxt->baserect.right = ((PBITMAP)pobj)->width; pdctxt->baserect.bottom = ((PBITMAP)pobj)->height; - G_intersect_rect(&rtmp, &(pdctxt->baserect), &(pdctxt->cliprect)); + G_rect_intersect(&rtmp, &(pdctxt->baserect), &(pdctxt->cliprect)); memcpy(&(pdctxt->cliprect), &rtmp, sizeof(RECT)); return (PGFXOBJECT)rbmp; }