diff --git a/src/devctxt.c b/src/devctxt.c index 4d342f7..c1ea7e3 100755 --- a/src/devctxt.c +++ b/src/devctxt.c @@ -220,7 +220,7 @@ PGFXOBJECT DC_SelectObject(PDCTXT pdctxt, PGFXOBJECT pobj) pdctxt->baserect.bottom = ((PBITMAP)pobj)->height; G_intersect_rect(&rtmp, &(pdctxt->baserect), &(pdctxt->cliprect)); memcpy(&(pdctxt->cliprect), &rtmp, sizeof(RECT)); - return rbmp; + return (PGFXOBJECT)rbmp; } Go_release(pobj); } @@ -236,9 +236,9 @@ BOOL DC_BitBlt(PDCTXT dest, INT32 x, INT32 y, INT32 width, INT32 height, PDCTXT if (!G_rect_intersect(&actualdest, &destrect, &(dest->cliprect))) return TRUE; /* no-op */ G_set_rect(&srcrect, x1, y1, x1 + (actualdest.right - actualdest.left), y1 + (actualdest.bottom - actualdest.top)); - if (!G_rect_intersect(&actualsrc, &srcrect, &(src->baserect))) + if (!G_rect_intersect(&actualsrc, &srcrect, &(source->baserect))) return TRUE; actualdest.right = actualdest.left + (actualsrc.right - actualsrc.left); actualdest.bottom = actualdest.top + (actualsrc.bottom - actualsrc.top); - return (*(dest->funcs->bitblt))(dest->privdata, &actualdest, src->privdata, &actualsrc, rop); + return (*(dest->funcs->bitblt))(dest->privdata, &actualdest, source->privdata, &actualsrc, rop); } diff --git a/src/ep_devctxt.c b/src/ep_devctxt.c index 4e77134..9449865 100755 --- a/src/ep_devctxt.c +++ b/src/ep_devctxt.c @@ -150,7 +150,7 @@ static PyObject *devctxt_select_bitmap(DevCtxtObject *self, BitmapObject *newbmp return NULL; } old_bitmap = self->selected_bitmap; - old_pbmp = DC_SelectObject(self->pdctxt, newbmp->pbmp); + old_pbmp = (PBITMAP)DC_SelectObject(self->pdctxt, (PGFXOBJECT)(newbmp->pbmp)); if (!old_bitmap) { old_bitmap = Epython_wrap_bitmap(old_pbmp);