mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-12-02 10:43:44 +01:00
Logging API change (refactor) (#19324)
* Rename LogType to Log * Explicitly use the Log:: enum when logging. Allows for autocomplete when editing. * Mac/ARM64 buildfix * Do the same with the hle result log macros * Rename the log names to mixed case while at it. * iOS buildfix * Qt buildfix attempt, ARM32 buildfix
This commit is contained in:
1 parent
ae3ff686f0
commit
e01ca5b057
393 files changed
+6198
-6193
No files matched your search
+10
-10
@@ -70,7 +70,7 @@ private:
|
||||
static bool WriteScreenshotToJPEG(const Path &filename, int width, int height, int num_channels, const uint8_t *image_data, const jpge::params &comp_params) {
|
||||
JPEGFileStream dst_stream(filename);
|
||||
if (!dst_stream.Valid()) {
|
||||
ERROR_LOG(IO, "Unable to open screenshot file for writing.");
|
||||
ERROR_LOG(Log::IO, "Unable to open screenshot file for writing.");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -92,7 +92,7 @@ static bool WriteScreenshotToJPEG(const Path &filename, int width, int height, i
|
||||
}
|
||||
|
||||
if (!dst_stream.Valid()) {
|
||||
ERROR_LOG(SYSTEM, "Screenshot file write failed.");
|
||||
ERROR_LOG(Log::System, "Screenshot file write failed.");
|
||||
}
|
||||
|
||||
dst_image.deinit();
|
||||
@@ -102,7 +102,7 @@ static bool WriteScreenshotToJPEG(const Path &filename, int width, int height, i
|
||||
static bool WriteScreenshotToPNG(png_imagep image, const Path &filename, int convert_to_8bit, const void *buffer, png_int_32 row_stride, const void *colormap) {
|
||||
FILE *fp = File::OpenCFile(filename, "wb");
|
||||
if (!fp) {
|
||||
ERROR_LOG(IO, "Unable to open screenshot file for writing.");
|
||||
ERROR_LOG(Log::IO, "Unable to open screenshot file for writing.");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -110,7 +110,7 @@ static bool WriteScreenshotToPNG(png_imagep image, const Path &filename, int con
|
||||
fclose(fp);
|
||||
return true;
|
||||
} else {
|
||||
ERROR_LOG(IO, "Screenshot PNG encode failed.");
|
||||
ERROR_LOG(Log::IO, "Screenshot PNG encode failed.");
|
||||
fclose(fp);
|
||||
// Should we even do this?
|
||||
File::Delete(filename);
|
||||
@@ -337,7 +337,7 @@ bool TakeGameScreenshot(Draw::DrawContext *draw, const Path &filename, Screensho
|
||||
|
||||
if (type == SCREENSHOT_DISPLAY || type == SCREENSHOT_RENDER) {
|
||||
if (!gpuDebug) {
|
||||
ERROR_LOG(SYSTEM, "Can't take screenshots when GPU not running");
|
||||
ERROR_LOG(Log::System, "Can't take screenshots when GPU not running");
|
||||
return false;
|
||||
}
|
||||
success = gpuDebug->GetCurrentFramebuffer(buf, type == SCREENSHOT_RENDER ? GPU_DBG_FRAMEBUF_RENDER : GPU_DBG_FRAMEBUF_DISPLAY, maxRes);
|
||||
@@ -356,7 +356,7 @@ bool TakeGameScreenshot(Draw::DrawContext *draw, const Path &filename, Screensho
|
||||
}
|
||||
|
||||
if (!success) {
|
||||
ERROR_LOG(G3D, "Failed to obtain screenshot data.");
|
||||
ERROR_LOG(Log::G3D, "Failed to obtain screenshot data.");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -376,7 +376,7 @@ bool TakeGameScreenshot(Draw::DrawContext *draw, const Path &filename, Screensho
|
||||
}
|
||||
|
||||
if (!success) {
|
||||
ERROR_LOG(IO, "Failed to write screenshot.");
|
||||
ERROR_LOG(Log::IO, "Failed to write screenshot.");
|
||||
}
|
||||
|
||||
return success;
|
||||
@@ -394,7 +394,7 @@ bool Save888RGBScreenshot(const Path &filename, ScreenshotFormat fmt, const u8 *
|
||||
png_image_free(&png);
|
||||
|
||||
if (png.warning_or_error >= 2) {
|
||||
ERROR_LOG(IO, "Saving screenshot to PNG produced errors.");
|
||||
ERROR_LOG(Log::IO, "Saving screenshot to PNG produced errors.");
|
||||
success = false;
|
||||
}
|
||||
return success;
|
||||
@@ -417,7 +417,7 @@ bool Save8888RGBAScreenshot(const Path &filename, const u8 *buffer, int w, int h
|
||||
png_image_free(&png);
|
||||
|
||||
if (png.warning_or_error >= 2) {
|
||||
ERROR_LOG(IO, "Saving screenshot to PNG produced errors.");
|
||||
ERROR_LOG(Log::IO, "Saving screenshot to PNG produced errors.");
|
||||
success = false;
|
||||
}
|
||||
return success;
|
||||
@@ -444,7 +444,7 @@ bool Save8888RGBAScreenshot(std::vector<uint8_t> &bufferPNG, const u8 *bufferRGB
|
||||
png_image_free(&png);
|
||||
|
||||
if (!success) {
|
||||
ERROR_LOG(IO, "Buffering screenshot to PNG produced errors.");
|
||||
ERROR_LOG(Log::IO, "Buffering screenshot to PNG produced errors.");
|
||||
bufferPNG.clear();
|
||||
}
|
||||
return success;
|
||||
|
||||
Reference in new issue
Block a user