mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-02-19 21:52:45 +00:00
Fix bug in blue-to-alpha - alpha blending could be on when it shouldn't be.
Fixes #15732. (Split/Second environment mapping problem in the menu).
This commit is contained in:
parent
fc70d21d04
commit
a44bee6f85
@ -77,6 +77,12 @@ std::string TextDrawerAndroid::NormalizeString(std::string str) {
|
||||
}
|
||||
|
||||
void TextDrawerAndroid::MeasureString(const char *str, size_t len, float *w, float *h) {
|
||||
if (!str) {
|
||||
*w = 0.0;
|
||||
*h = 0.0;
|
||||
return;
|
||||
}
|
||||
|
||||
CacheKey key{ std::string(str, len), fontHash_ };
|
||||
TextMeasureEntry *entry;
|
||||
auto iter = sizeCache_.find(key);
|
||||
|
@ -1089,9 +1089,12 @@ void ConvertBlendState(GenericBlendState &blendState, bool allowFramebufferRead,
|
||||
|
||||
case REPLACE_BLEND_BLUE_TO_ALPHA:
|
||||
blueToAlpha = true;
|
||||
blendState.enabled = gstate.isAlphaBlendEnabled();
|
||||
// We'll later convert the color blend to blend in the alpha channel.
|
||||
break;
|
||||
|
||||
case REPLACE_BLEND_COPY_FBO:
|
||||
blendState.enabled = true;
|
||||
blendState.applyFramebufferRead = true;
|
||||
blendState.resetFramebufferRead = false;
|
||||
blendState.replaceAlphaWithStencil = replaceAlphaWithStencil;
|
||||
@ -1099,16 +1102,17 @@ void ConvertBlendState(GenericBlendState &blendState, bool allowFramebufferRead,
|
||||
|
||||
case REPLACE_BLEND_PRE_SRC:
|
||||
case REPLACE_BLEND_PRE_SRC_2X_ALPHA:
|
||||
blendState.enabled = true;
|
||||
usePreSrc = true;
|
||||
break;
|
||||
|
||||
case REPLACE_BLEND_STANDARD:
|
||||
case REPLACE_BLEND_2X_ALPHA:
|
||||
case REPLACE_BLEND_2X_SRC:
|
||||
blendState.enabled = true;
|
||||
break;
|
||||
}
|
||||
|
||||
blendState.enabled = true;
|
||||
blendState.resetFramebufferRead = true;
|
||||
|
||||
const GEBlendMode blendFuncEq = gstate.getBlendEq();
|
||||
|
@ -1102,6 +1102,7 @@ NPEH00029 = true
|
||||
ULUS10455 = true
|
||||
|
||||
[BlueToAlpha]
|
||||
# Split/Second
|
||||
ULES01402 = true
|
||||
ULUS10513 = true
|
||||
ULJM05812 = true
|
||||
|
Loading…
x
Reference in New Issue
Block a user