Add some missing checks in D3D from the last commit.

This commit is contained in:
Henrik Rydgard 2015-11-04 10:34:52 +01:00
parent 8145cc789a
commit 99e3ee1f71

View File

@ -366,6 +366,21 @@ void TransformDrawEngineDX9::ApplyBlendState() {
bool approxFuncB = false;
D3DBLEND glBlendFuncB = blendFuncB == GE_DSTBLEND_FIXB ? blendColor2Func(gstate.getFixB(), approxFuncB) : bLookup[blendFuncB];
if (gstate.FrameBufFormat() == GE_FORMAT_565) {
if (blendFuncA == GE_SRCBLEND_DSTALPHA || blendFuncA == GE_SRCBLEND_DOUBLEDSTALPHA) {
glBlendFuncA = D3DBLEND_ZERO;
}
if (blendFuncA == GE_SRCBLEND_INVDSTALPHA || blendFuncA == GE_SRCBLEND_DOUBLEINVDSTALPHA) {
glBlendFuncA = D3DBLEND_ONE;
}
if (blendFuncB == GE_DSTBLEND_DSTALPHA || blendFuncB == GE_DSTBLEND_DOUBLEDSTALPHA) {
glBlendFuncB = D3DBLEND_ZERO;
}
if (blendFuncB == GE_DSTBLEND_INVDSTALPHA || blendFuncB == GE_DSTBLEND_DOUBLEINVDSTALPHA) {
glBlendFuncB = D3DBLEND_ONE;
}
}
if (usePreSrc) {
glBlendFuncA = D3DBLEND_ONE;
// Need to pull in the fixed color.