hackathon-dev #1

Merged
amy merged 101 commits from hackathon-dev into develop 2019-12-12 13:56:11 -07:00
2 changed files with 5 additions and 3 deletions
Showing only changes of commit d7439be320 - Show all commits

View File

@ -1,4 +1,5 @@
#include <stdlib.h> #include <stdlib.h>
#inlcude <string.h>
#include "log.h" #include "log.h"
#include "fbinit.h" #include "fbinit.h"
#include "devctxt.h" #include "devctxt.h"
@ -160,7 +161,7 @@ static BOOL screen_solid_rect(PVOID privdata, PRECT rect, COLORREF color, INT32
PUINT16 ps, p; PUINT16 ps, p;
int y, x; 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++) for (y = rect->top; y < rect->bottom; y++)
{ {
p = ps; p = ps;
@ -178,6 +179,7 @@ static PDCTXT screen_create_compat(PVOID privdata)
{ {
PSCREENPRIVDATA priv_new; PSCREENPRIVDATA priv_new;
PBITMAP pbmp; PBITMAP pbmp;
PDCTXT rc;
pbmp = BMP_Create(1, 1, NULL); pbmp = BMP_Create(1, 1, NULL);
if (!pbmp) if (!pbmp)
@ -204,7 +206,7 @@ static PDCTXT screen_create_compat(PVOID privdata)
} }
else else
{ {
free(priv); free(priv_new);
Go_release(&(pbmp->hdr)); Go_release(&(pbmp->hdr));
} }
return rc; return rc;

View File

@ -218,7 +218,7 @@ PGFXOBJECT DC_SelectObject(PDCTXT pdctxt, PGFXOBJECT pobj)
pdctxt->baserect.left = pdctxt->baserect.top = 0; pdctxt->baserect.left = pdctxt->baserect.top = 0;
pdctxt->baserect.right = ((PBITMAP)pobj)->width; pdctxt->baserect.right = ((PBITMAP)pobj)->width;
pdctxt->baserect.bottom = ((PBITMAP)pobj)->height; 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)); memcpy(&(pdctxt->cliprect), &rtmp, sizeof(RECT));
return (PGFXOBJECT)rbmp; return (PGFXOBJECT)rbmp;
} }