mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-10 21:16:24 +02:00
Keep Qt UI screenshots in RGB888 format, just convert the buffer properly
This commit is contained in:
1 parent
168ab06266
commit
f81ec4ce65
1 file changed
+3
-3
+3
-3
@@ -236,10 +236,10 @@ bool TakeGameScreenshot(const char *filename, ScreenshotFormat fmt, ScreenshotTy
|
||||
|
||||
#ifdef USING_QT_UI
|
||||
if (success) {
|
||||
u8 *flipbuffer = nullptr;
|
||||
const u8 *buffer = ConvertBufferTo888RGB(buf, flipbuffer);
|
||||
// TODO: Handle other formats (e.g. Direct3D, raw framebuffers.)
|
||||
const u8 *buffer = buf.GetData();
|
||||
QImage image(buffer, buf.GetStride(), buf.GetHeight(), QImage::Format_RGB32);
|
||||
image = image.mirrored();
|
||||
QImage image(buffer, buf.GetStride(), buf.GetHeight(), QImage::Format_RGB888);
|
||||
success = image.save(filename, fmt == SCREENSHOT_PNG ? "PNG" : "JPG");
|
||||
}
|
||||
#else
|
||||
|
||||
Reference in new issue
Block a user