Change clipping in DSBarInfo::DrawGraphic()

- Fixed: When DSBarInfo::DrawGraphic() is used scaled, without fullscreen
  offset, if one of the top and left clip locations was 0 and the other
  was non-0, the 0 one would be clipped to the edge of a 4:3 box centered
  on the screen instead of the edge of the screen.
This commit is contained in:
Randy Heit 2014-12-26 18:40:15 -06:00
parent 798267d223
commit bce7d12379

View file

@ -1215,7 +1215,11 @@ public:
if(Scaled) if(Scaled)
{ {
if(cx != 0 || cy != 0) if(cx != 0 || cy != 0)
{
screen->VirtualToRealCoords(dcx, dcy, tmp, tmp, script->resW, script->resH, true); screen->VirtualToRealCoords(dcx, dcy, tmp, tmp, script->resW, script->resH, true);
if (cx == 0) dcx = 0;
if (cy == 0) dcy = 0;
}
if(cr != 0 || cb != 0 || clearDontDraw) if(cr != 0 || cb != 0 || clearDontDraw)
screen->VirtualToRealCoords(dcr, dcb, tmp, tmp, script->resW, script->resH, true); screen->VirtualToRealCoords(dcr, dcb, tmp, tmp, script->resW, script->resH, true);
screen->VirtualToRealCoords(dx, dy, w, h, script->resW, script->resH, true); screen->VirtualToRealCoords(dx, dy, w, h, script->resW, script->resH, true);