summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/ImageWrite.cpp
diff options
context:
space:
mode:
authorMarkus Wick <markus@selfnet.de>2015-06-04 13:28:53 +0200
committerMarkus Wick <markus@selfnet.de>2015-06-04 13:28:53 +0200
commitf5b0468179f1c3c15cfb5957218ee9f27cb47d77 (patch)
tree85eba1aac30cdd78d87ae3691e1a8723e3eb6e1e /Source/Core/VideoCommon/ImageWrite.cpp
parent98ed5881abaf1fa61c9c9638cbb093280297b8e5 (diff)
parent030d467d62cb1e3e5b40c5ba3fa142626efef9a5 (diff)
Merge pull request #2213 from JosJuice/panic-alert-t
Use PanicAlertT/PanicAlert when appropriate
Diffstat (limited to 'Source/Core/VideoCommon/ImageWrite.cpp')
-rw-r--r--Source/Core/VideoCommon/ImageWrite.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/Source/Core/VideoCommon/ImageWrite.cpp b/Source/Core/VideoCommon/ImageWrite.cpp
index 8c5284eb57..38ca509c3e 100644
--- a/Source/Core/VideoCommon/ImageWrite.cpp
+++ b/Source/Core/VideoCommon/ImageWrite.cpp
@@ -43,7 +43,7 @@ bool TextureToPng(u8* data, int row_stride, const std::string& filename, int wid
File::IOFile fp(filename, "wb");
if (!fp.IsOpen())
{
- PanicAlert("Screenshot failed: Could not open file %s %d\n", filename.c_str(), errno);
+ PanicAlertT("Screenshot failed: Could not open file \"%s\" (error %d)", filename.c_str(), errno);
goto finalise;
}
@@ -51,23 +51,22 @@ bool TextureToPng(u8* data, int row_stride, const std::string& filename, int wid
png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, nullptr, nullptr, nullptr);
if (png_ptr == nullptr)
{
- PanicAlert("Screenshot failed: Could not allocate write struct\n");
+ PanicAlert("Screenshot failed: Could not allocate write struct");
goto finalise;
-
}
// Initialize info structure
info_ptr = png_create_info_struct(png_ptr);
if (info_ptr == nullptr)
{
- PanicAlert("Screenshot failed: Could not allocate info struct\n");
+ PanicAlert("Screenshot failed: Could not allocate info struct");
goto finalise;
}
// Setup Exception handling
if (setjmp(png_jmpbuf(png_ptr)))
{
- PanicAlert("Screenshot failed: Error during png creation\n");
+ PanicAlert("Screenshot failed: Error during PNG creation");
goto finalise;
}