Allow taking screenshots in the app menu

This commit is contained in:
Henrik Rydgård committed 2024-05-10 21:10:11 +02:00
1 parent e0e96200b9
commit d21fef52ae
8 files changed
+34 -19

No files matched your search

+4 -1
View File
@@ -20,6 +20,9 @@
#include "Common/File/Path.h"
struct GPUDebugBuffer;
namespace Draw {
class DrawContext;
}
enum class ScreenshotFormat {
PNG,
@@ -38,7 +41,7 @@ enum ScreenshotType {
const u8 *ConvertBufferToScreenshot(const GPUDebugBuffer &buf, bool alpha, u8 *&temp, u32 &w, u32 &h);
// Can only be used while in game.
bool TakeGameScreenshot(const Path &filename, ScreenshotFormat fmt, ScreenshotType type, int *width = nullptr, int *height = nullptr, int maxRes = -1);
bool TakeGameScreenshot(Draw::DrawContext *draw, const Path &filename, ScreenshotFormat fmt, ScreenshotType type, int *width = nullptr, int *height = nullptr, int maxRes = -1);
bool Save888RGBScreenshot(const Path &filename, ScreenshotFormat fmt, const u8 *bufferRGB888, int w, int h);
bool Save8888RGBAScreenshot(const Path &filename, const u8 *bufferRGBA8888, int w, int h);