D3D+OGL: choose blendenable over logicopenable.

No sane game should turn on both logicopenable and blendenable in the same
blend mode, but not every game is sane. Fixes issue 6009.
This commit is contained in:
magumagu 2014-12-15 20:08:54 -08:00
parent 7b5b76caa4
commit 31bcdb8f2f
2 changed files with 3 additions and 3 deletions

View File

@ -615,7 +615,7 @@ void Renderer::SetBlendMode(bool forceUpdate)
(target_has_alpha) ? D3D11_BLEND_INV_DEST_ALPHA : D3D11_BLEND_ZERO (target_has_alpha) ? D3D11_BLEND_INV_DEST_ALPHA : D3D11_BLEND_ZERO
}; };
if (bpmem.blendmode.logicopenable && !forceUpdate) if (bpmem.blendmode.logicopenable && !bpmem.blendmode.blendenable && !forceUpdate)
return; return;
if (bpmem.blendmode.subtract) if (bpmem.blendmode.subtract)
@ -1234,7 +1234,7 @@ void Renderer::SetLogicOpMode()
D3D11_BLEND_ONE//15 D3D11_BLEND_ONE//15
}; };
if (bpmem.blendmode.logicopenable) if (bpmem.blendmode.logicopenable && !bpmem.blendmode.blendenable)
{ {
gx_state.blend.blend_enable = true; gx_state.blend.blend_enable = true;
gx_state.blend.blend_op = d3dLogicOps[bpmem.blendmode.logicmode]; gx_state.blend.blend_op = d3dLogicOps[bpmem.blendmode.logicmode];

View File

@ -1882,7 +1882,7 @@ void Renderer::SetLogicOpMode()
GL_SET GL_SET
}; };
if (bpmem.blendmode.logicopenable) if (bpmem.blendmode.logicopenable && !bpmem.blendmode.blendenable)
{ {
glEnable(GL_COLOR_LOGIC_OP); glEnable(GL_COLOR_LOGIC_OP);
glLogicOp(glLogicOpCodes[bpmem.blendmode.logicmode]); glLogicOp(glLogicOpCodes[bpmem.blendmode.logicmode]);