mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-01 14:58:14 +00:00
Merge branch 'hrydgard:master' into master
This commit is contained in:
6 files changed
+24
-9
No files matched your search
@@ -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);
|
||||
|
||||
@@ -231,7 +231,7 @@ bool CISOFileBlockDevice::ReadBlock(int blockNumber, u8 *outPtr, bool uncached)
|
||||
const u32 idx = index[frameNumber];
|
||||
const u32 indexPos = idx & 0x7FFFFFFF;
|
||||
const u32 nextIndexPos = index[frameNumber + 1] & 0x7FFFFFFF;
|
||||
z_stream z;
|
||||
z_stream z{};
|
||||
|
||||
const u64 compressedReadPos = (u64)indexPos << indexShift;
|
||||
const u64 compressedReadEnd = (u64)nextIndexPos << indexShift;
|
||||
@@ -311,10 +311,7 @@ bool CISOFileBlockDevice::ReadBlocks(u32 minBlock, int count, u8 *outPtr) {
|
||||
const u32 afterLastIndexPos = index[lastFrameNumber + 1] & 0x7FFFFFFF;
|
||||
const u64 totalReadEnd = (u64)afterLastIndexPos << indexShift;
|
||||
|
||||
z_stream z;
|
||||
z.zalloc = Z_NULL;
|
||||
z.zfree = Z_NULL;
|
||||
z.opaque = Z_NULL;
|
||||
z_stream z{};
|
||||
if (inflateInit2(&z, -15) != Z_OK) {
|
||||
ERROR_LOG(LOADER, "Unable to initialize inflate: %s\n", (z.msg) ? z.msg : "?");
|
||||
return false;
|
||||
|
||||
+5
-3
@@ -280,9 +280,11 @@ namespace Reporting
|
||||
return false;
|
||||
|
||||
if (http.Resolve(serverHost, ServerPort())) {
|
||||
http.Connect();
|
||||
int result = http.POST(http::RequestParams(uri), data, mimeType, output, &progress);
|
||||
http.Disconnect();
|
||||
int result = -1;
|
||||
if (http.Connect()) {
|
||||
result = http.POST(http::RequestParams(uri), data, mimeType, output, &progress);
|
||||
http.Disconnect();
|
||||
}
|
||||
|
||||
return result >= 200 && result < 300;
|
||||
} else {
|
||||
|
||||
@@ -456,6 +456,11 @@ bool TextureReplacer::PopulateLevel(ReplacedTextureLevel &level) {
|
||||
bool good = false;
|
||||
|
||||
FILE *fp = File::OpenCFile(level.file, "rb");
|
||||
if (!fp) {
|
||||
ERROR_LOG(G3D, "Error opening replacement texture file '%s'", level.file.c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
auto imageType = Identify(fp);
|
||||
if (imageType == ReplacedImageType::ZIM) {
|
||||
fseek(fp, 4, SEEK_SET);
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in new issue
Block a user