mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-16 16:00:30 +02:00
Remove base/logging.h in a whole lot more places.
This commit is contained in:
1 parent
5eb13378c6
commit
c41f875df4
36 files changed
+136
-127
No files matched your search
+10
-10
@@ -43,7 +43,7 @@ static bool LoadTextureLevels(const uint8_t *data, size_t size, ImageFileType ty
|
||||
type = DetectImageFileType(data, size);
|
||||
}
|
||||
if (type == TYPE_UNKNOWN) {
|
||||
ELOG("File (size: %d) has unknown format", (int)size);
|
||||
ERROR_LOG(G3D, "File (size: %d) has unknown format", (int)size);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -63,11 +63,11 @@ static bool LoadTextureLevels(const uint8_t *data, size_t size, ImageFileType ty
|
||||
*num_levels = 1;
|
||||
*fmt = Draw::DataFormat::R8G8B8A8_UNORM;
|
||||
if (!image[0]) {
|
||||
ELOG("WTF");
|
||||
ERROR_LOG(IO, "WTF");
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
ELOG("PNG load failed");
|
||||
ERROR_LOG(IO, "PNG load failed");
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
@@ -85,7 +85,7 @@ static bool LoadTextureLevels(const uint8_t *data, size_t size, ImageFileType ty
|
||||
break;
|
||||
|
||||
default:
|
||||
ELOG("Unsupported image format %d", (int)type);
|
||||
ERROR_LOG(IO, "Unsupported image format %d", (int)type);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -111,7 +111,7 @@ bool ManagedTexture::LoadFromFileData(const uint8_t *data, size_t dataSize, Imag
|
||||
}
|
||||
|
||||
if (num_levels < 0 || num_levels >= 16) {
|
||||
ELOG("Invalid num_levels: %d. Falling back to one. Image: %dx%d", num_levels, width[0], height[0]);
|
||||
ERROR_LOG(IO, "Invalid num_levels: %d. Falling back to one. Image: %dx%d", num_levels, width[0], height[0]);
|
||||
num_levels = 1;
|
||||
}
|
||||
|
||||
@@ -149,7 +149,7 @@ bool ManagedTexture::LoadFromFile(const std::string &filename, ImageFileType typ
|
||||
uint8_t *buffer = VFSReadFile(filename.c_str(), &fileSize);
|
||||
if (!buffer) {
|
||||
filename_ = "";
|
||||
ELOG("Failed to read file '%s'", filename.c_str());
|
||||
ERROR_LOG(IO, "Failed to read file '%s'", filename.c_str());
|
||||
return false;
|
||||
}
|
||||
bool retval = LoadFromFileData(buffer, fileSize, type, generateMips, filename.c_str());
|
||||
@@ -157,7 +157,7 @@ bool ManagedTexture::LoadFromFile(const std::string &filename, ImageFileType typ
|
||||
filename_ = filename;
|
||||
} else {
|
||||
filename_ = "";
|
||||
ELOG("Failed to load texture '%s'", filename.c_str());
|
||||
ERROR_LOG(IO, "Failed to load texture '%s'", filename.c_str());
|
||||
}
|
||||
delete[] buffer;
|
||||
return retval;
|
||||
@@ -176,14 +176,14 @@ std::unique_ptr<ManagedTexture> CreateTextureFromFile(Draw::DrawContext *draw, c
|
||||
}
|
||||
|
||||
void ManagedTexture::DeviceLost() {
|
||||
ILOG("ManagedTexture::DeviceLost(%s)", filename_.c_str());
|
||||
INFO_LOG(G3D, "ManagedTexture::DeviceLost(%s)", filename_.c_str());
|
||||
if (texture_)
|
||||
texture_->Release();
|
||||
texture_ = nullptr;
|
||||
}
|
||||
|
||||
void ManagedTexture::DeviceRestored(Draw::DrawContext *draw) {
|
||||
ILOG("ManagedTexture::DeviceRestored(%s)", filename_.c_str());
|
||||
INFO_LOG(G3D, "ManagedTexture::DeviceRestored(%s)", filename_.c_str());
|
||||
_assert_(!texture_);
|
||||
draw_ = draw;
|
||||
// Vulkan: Can't load textures before the first frame has started.
|
||||
@@ -194,7 +194,7 @@ void ManagedTexture::DeviceRestored(Draw::DrawContext *draw) {
|
||||
Draw::Texture *ManagedTexture::GetTexture() {
|
||||
if (loadPending_) {
|
||||
if (!LoadFromFile(filename_, ImageFileType::DETECT, generateMips_)) {
|
||||
ELOG("ManagedTexture failed: '%s'", filename_.c_str());
|
||||
ERROR_LOG(IO, "ManagedTexture failed: '%s'", filename_.c_str());
|
||||
}
|
||||
loadPending_ = false;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user