Settings: Support saving WebP screenshots

This commit is contained in:
Stenzek 2024-03-24 14:28:08 +10:00
parent f3c0c14b2a
commit 43fc9f1ef2
No known key found for this signature in database
2 changed files with 4 additions and 0 deletions

View File

@ -1563,14 +1563,17 @@ const char* Settings::GetDisplayScreenshotModeDisplayName(DisplayScreenshotMode
static constexpr const std::array s_display_screenshot_format_names = { static constexpr const std::array s_display_screenshot_format_names = {
"PNG", "PNG",
"JPEG", "JPEG",
"WebP",
}; };
static constexpr const std::array s_display_screenshot_format_display_names = { static constexpr const std::array s_display_screenshot_format_display_names = {
TRANSLATE_NOOP("Settings", "PNG"), TRANSLATE_NOOP("Settings", "PNG"),
TRANSLATE_NOOP("Settings", "JPEG"), TRANSLATE_NOOP("Settings", "JPEG"),
TRANSLATE_NOOP("Settings", "WebP"),
}; };
static constexpr const std::array s_display_screenshot_format_extensions = { static constexpr const std::array s_display_screenshot_format_extensions = {
"png", "png",
"jpg", "jpg",
"webp",
}; };
std::optional<DisplayScreenshotFormat> Settings::ParseDisplayScreenshotFormat(const char* str) std::optional<DisplayScreenshotFormat> Settings::ParseDisplayScreenshotFormat(const char* str)

View File

@ -181,6 +181,7 @@ enum class DisplayScreenshotFormat : u8
{ {
PNG, PNG,
JPEG, JPEG,
WebP,
Count Count
}; };