mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Replacement: Avoid issues with c++14 data().
This commit is contained in:
parent
6105688c32
commit
15645ca480
1 changed files with 4 additions and 4 deletions
|
@ -642,10 +642,10 @@ bool TextureReplacer::PopulateLevelFromZip(ReplacedTextureLevel &level, bool ign
|
|||
if (zsize != INVALID_ZIP_SIZE)
|
||||
pngdata.resize(zsize);
|
||||
if (!pngdata.empty()) {
|
||||
pngdata.resize(zip_fread(zf, pngdata.data(), pngdata.size()));
|
||||
pngdata.resize(zip_fread(zf, &pngdata[0], pngdata.size()));
|
||||
}
|
||||
|
||||
if (png_image_begin_read_from_memory(&png, pngdata.data(), pngdata.size())) {
|
||||
if (png_image_begin_read_from_memory(&png, &pngdata[0], pngdata.size())) {
|
||||
// We pad files that have been hashrange'd so they are the same texture size.
|
||||
level.w = png.width;
|
||||
level.h = png.height;
|
||||
|
@ -1168,10 +1168,10 @@ void ReplacedTexture::PrepareData(int level) {
|
|||
if (zsize != INVALID_ZIP_SIZE)
|
||||
pngdata.resize(zsize);
|
||||
if (!pngdata.empty()) {
|
||||
pngdata.resize(zip_fread(zf, pngdata.data(), pngdata.size()));
|
||||
pngdata.resize(zip_fread(zf, &pngdata[0], pngdata.size()));
|
||||
}
|
||||
|
||||
if (!png_image_begin_read_from_memory(&png, pngdata.data(), pngdata.size())) {
|
||||
if (!png_image_begin_read_from_memory(&png, &pngdata[0], pngdata.size())) {
|
||||
ERROR_LOG(G3D, "Could not load texture replacement info: %s - %s (zip)", info.file.c_str(), png.message);
|
||||
cleanup();
|
||||
return;
|
||||
|
|
Loading…
Add table
Reference in a new issue