diff options
author | bunnei <ericbunnie@gmail.com> | 2014-05-22 22:54:56 -0400 |
---|---|---|
committer | bunnei <ericbunnie@gmail.com> | 2014-05-22 22:54:56 -0400 |
commit | 1de7e8cbe4ee9aab3bc920721a90ef63537771b8 (patch) | |
tree | 4aae70232dc6d148af003a4d9f1c4f76aff5467b /src/video_core/utils.cpp | |
parent | 9592d61037d05dc53b454644671a441788996208 (diff) | |
parent | 204c6bfeca2d3bccfe6602699c0b3420f88aaf07 (diff) |
Merge branch 'master' of https://github.com/bunnei/citra
Diffstat (limited to 'src/video_core/utils.cpp')
-rw-r--r-- | src/video_core/utils.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/video_core/utils.cpp b/src/video_core/utils.cpp index 67d74a2d8..b94376ac1 100644 --- a/src/video_core/utils.cpp +++ b/src/video_core/utils.cpp @@ -8,7 +8,6 @@ #include "video_core/utils.h" namespace VideoCore { - /** * Dumps a texture to TGA * @param filename String filename to dump texture to @@ -32,9 +31,9 @@ void DumpTGA(std::string filename, int width, int height, u8* raw_data) { fwrite(&hdr, sizeof(TGAHeader), 1, fout); for (int i = 0; i < height; i++) { for (int j = 0; j < width; j++) { - r = raw_data[(4 * (i * width)) + (4 * j) + 0]; - g = raw_data[(4 * (i * width)) + (4 * j) + 1]; - b = raw_data[(4 * (i * width)) + (4 * j) + 2]; + b = raw_data[(3 * (i * width)) + (3 * j) + 0]; + g = raw_data[(3 * (i * width)) + (3 * j) + 1]; + r = raw_data[(3 * (i * width)) + (3 * j) + 2]; putc(b, fout); putc(g, fout); putc(r, fout); @@ -42,5 +41,4 @@ void DumpTGA(std::string filename, int width, int height, u8* raw_data) { } fclose(fout); } - } // namespace |