Scale HUD when using DirectDraw. (fix regression from commit 5906d44
)
This commit is contained in:
parent
6fc7161f19
commit
60aedec5d2
|
@ -1833,12 +1833,11 @@ static void DD_DoDisplay()
|
||||||
else
|
else
|
||||||
doRotate<pix15>(ddraw.surfDescBack.lpSurface);
|
doRotate<pix15>(ddraw.surfDescBack.lpSurface);
|
||||||
break;
|
break;
|
||||||
|
case 0:
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
{
|
|
||||||
if(ddraw.surfDescBack.ddpfPixelFormat.dwRGBBitCount != 0)
|
|
||||||
INFO("Unsupported color depth: %i bpp\n", ddraw.surfDescBack.ddpfPixelFormat.dwRGBBitCount);
|
INFO("Unsupported color depth: %i bpp\n", ddraw.surfDescBack.ddpfPixelFormat.dwRGBBitCount);
|
||||||
//emu_halt();
|
//emu_halt();
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (!ddraw.unlock()) return;
|
if (!ddraw.unlock()) return;
|
||||||
|
@ -2010,24 +2009,23 @@ static void DoDisplay()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// draw HUD
|
|
||||||
if (ddhw || ddsw)
|
|
||||||
aggDraw.hud->attach((u8*)video.buffer, video.prefilterWidth, video.prefilterHeight, video.prefilterWidth * 4);
|
|
||||||
else
|
|
||||||
aggDraw.hud->clear();
|
|
||||||
DoDisplay_DrawHud();
|
|
||||||
|
|
||||||
//apply user's filter
|
//apply user's filter
|
||||||
video.filter();
|
video.filter();
|
||||||
|
|
||||||
|
// draw hud
|
||||||
|
aggDraw.hud->clear();
|
||||||
|
DoDisplay_DrawHud();
|
||||||
|
|
||||||
if(ddhw || ddsw)
|
if(ddhw || ddsw)
|
||||||
{
|
{
|
||||||
|
// DirectDraw doesn't support alpha blending, so we must scale and overlay the HUD ourselves.
|
||||||
|
T_AGG_RGBA target((u8*)video.finalBuffer(), video.width, video.height, video.width * 4);
|
||||||
|
target.transformImage(aggDraw.hud->image<T_AGG_PF_RGBA>(), 0, 0, video.width, video.height);
|
||||||
gldisplay.kill();
|
gldisplay.kill();
|
||||||
DD_DoDisplay();
|
DD_DoDisplay();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//other cases..?
|
|
||||||
OGL_DoDisplay();
|
OGL_DoDisplay();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue