summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/ImageWrite.cpp
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2014-08-30 18:20:13 -0400
committerLioncash <mathew1800@gmail.com>2014-08-30 18:20:13 -0400
commit2c7bcd0d048c2e298a5d1e94cb493c6d879f6dd9 (patch)
tree0159e4c50212488aca33dcff7dbe09ed4e251eed /Source/Core/VideoCommon/ImageWrite.cpp
parent77aef014a0352d819e8ea63bafb6262b9af485cb (diff)
parenteb535be8741fd8672b5db972ca43360ca14a9a78 (diff)
Merge pull request #911 from lioncash/braces
Clean up brace placements within the project.
Diffstat (limited to 'Source/Core/VideoCommon/ImageWrite.cpp')
-rw-r--r--Source/Core/VideoCommon/ImageWrite.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/Source/Core/VideoCommon/ImageWrite.cpp b/Source/Core/VideoCommon/ImageWrite.cpp
index db6cbf69c7..2666c62a8a 100644
--- a/Source/Core/VideoCommon/ImageWrite.cpp
+++ b/Source/Core/VideoCommon/ImageWrite.cpp
@@ -41,14 +41,16 @@ bool TextureToPng(u8* data, int row_stride, const std::string& filename, int wid
// Open file for writing (binary mode)
File::IOFile fp(filename, "wb");
- if (!fp.IsOpen()) {
+ if (!fp.IsOpen())
+ {
PanicAlert("Screenshot failed: Could not open file %s %d\n", filename.c_str(), errno);
goto finalise;
}
// Initialize write structure
png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, nullptr, nullptr, nullptr);
- if (png_ptr == nullptr) {
+ if (png_ptr == nullptr)
+ {
PanicAlert("Screenshot failed: Could not allocate write struct\n");
goto finalise;
@@ -56,13 +58,15 @@ bool TextureToPng(u8* data, int row_stride, const std::string& filename, int wid
// Initialize info structure
info_ptr = png_create_info_struct(png_ptr);
- if (info_ptr == nullptr) {
+ if (info_ptr == nullptr)
+ {
PanicAlert("Screenshot failed: Could not allocate info struct\n");
goto finalise;
}
// Setup Exception handling
- if (setjmp(png_jmpbuf(png_ptr))) {
+ if (setjmp(png_jmpbuf(png_ptr)))
+ {
PanicAlert("Screenshot failed: Error during png creation\n");
goto finalise;
}