Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/xbmc/Util.cpp b/xbmc/Util.cpp
- index 72c84bb..d623f58 100644
- --- a/xbmc/Util.cpp
- +++ b/xbmc/Util.cpp
- @@ -935,7 +935,22 @@ void CUtil::TakeScreenshot(const CStdString &filename, bool sync)
- //make a new buffer and copy the read image to it with the Y axis inverted
- outpixels = new unsigned char[stride * height];
- for (int y = 0; y < height; y++)
- + {
- +#ifdef HAS_GLES
- + // we need to save in BGRA order so XOR Swap RGBA -> BGRA
- + unsigned char* swap_pixels = pixels;
- + for (int x = 0; x < width; x++, swap_pixels+=4)
- + {
- + if (swap_pixels[0] != swap_pixels[2])
- + {
- + swap_pixels[0] ^= swap_pixels[2];
- + swap_pixels[2] ^= swap_pixels[0];
- + swap_pixels[0] ^= swap_pixels[2];
- + }
- + }
- +#endif
- memcpy(outpixels + y * stride, pixels + (height - y - 1) * stride, stride);
- + }
- delete [] pixels;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement