Fix to streaming read pixel for Win32 driver in emulation mode.

This commit is contained in:
inmarket 2013-11-05 13:43:28 +10:00
parent ece5bcd6ab
commit e35b76388c

View File

@ -641,20 +641,20 @@ LLDSPEC bool_t gdisp_lld_init(GDisplay *g) {
#if GDISP_NEED_CONTROL #if GDISP_NEED_CONTROL
switch(g->g.Orientation) { switch(g->g.Orientation) {
case GDISP_ROTATE_0: case GDISP_ROTATE_0:
color = GetPixel(priv->dcBuffer, g->p.x, g->p.y); color = GetPixel(priv->dcBuffer, priv->x, priv->y);
break; break;
case GDISP_ROTATE_90: case GDISP_ROTATE_90:
color = GetPixel(priv->dcBuffer, g->p.y, g->g.Width - 1 - g->p.x); color = GetPixel(priv->dcBuffer, priv->y, g->g.Width - 1 - priv->x);
break; break;
case GDISP_ROTATE_180: case GDISP_ROTATE_180:
color = GetPixel(priv->dcBuffer, g->g.Width - 1 - g->p.x, g->g.Height - 1 - g->p.y); color = GetPixel(priv->dcBuffer, g->g.Width - 1 - priv->x, g->g.Height - 1 - priv->y);
break; break;
case GDISP_ROTATE_270: case GDISP_ROTATE_270:
color = GetPixel(priv->dcBuffer, g->g.Height - 1 - g->p.y, g->p.x); color = GetPixel(priv->dcBuffer, g->g.Height - 1 - priv->y, priv->x);
break; break;
} }
#else #else
color = GetPixel(priv->dcBuffer, g->p.x, g->p.y); color = GetPixel(priv->dcBuffer, priv->x, priv->y);
#endif #endif
ReleaseMutex(drawMutex); ReleaseMutex(drawMutex);