diff options
author | 2014-05-19 21:46:57 -0400 | |
---|---|---|
committer | 2014-05-19 21:46:57 -0400 | |
commit | 204c6bfeca2d3bccfe6602699c0b3420f88aaf07 (patch) | |
tree | 4ece05e69f90f50e3390eb93a0790180aafcdbc6 /src/video_core/utils.cpp | |
parent | b5d2ff9b26560b3f2bfdcd311ada661313eaba83 (diff) | |
parent | 5a8ed196e6e9416134a85fbc7da14fed3af307e4 (diff) |
Merge pull request #2 from archshift/issue-7-fix
Fixes issues with building Citra on OSX
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 67d74a2d..b94376ac 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 |