Enforce a max size for save state screenshot regardless of resolution mode (auto, skipbuf etc).

This commit is contained in:
Henrik Rydgård committed 2023-12-15 12:35:34 +01:00
1 parent 41bbc83b6d
commit bac4a01209
2 files changed
+2 -4

No files matched your search

+2 -2
View File
@@ -1050,8 +1050,8 @@ namespace SaveState
case SAVESTATE_SAVE_SCREENSHOT:
{
int maxRes = g_Config.iInternalResolution > 2 ? 2 : -1;
tempResult = TakeGameScreenshot(op.filename, ScreenshotFormat::JPG, SCREENSHOT_DISPLAY, nullptr, nullptr, maxRes);
int maxResMultiplier = 2;
tempResult = TakeGameScreenshot(op.filename, ScreenshotFormat::JPG, SCREENSHOT_DISPLAY, nullptr, nullptr, maxResMultiplier);
callbackResult = tempResult ? Status::SUCCESS : Status::FAILURE;
if (!tempResult) {
ERROR_LOG(SAVESTATE, "Failed to take a screenshot for the savestate! %s", op.filename.c_str());
-2
View File
@@ -340,8 +340,6 @@ bool TakeGameScreenshot(const Path &filename, ScreenshotFormat fmt, ScreenshotTy
if (type == SCREENSHOT_DISPLAY || type == SCREENSHOT_RENDER) {
success = gpuDebug->GetCurrentFramebuffer(buf, type == SCREENSHOT_RENDER ? GPU_DBG_FRAMEBUF_RENDER : GPU_DBG_FRAMEBUF_DISPLAY, maxRes);
// Only crop to the top left when using a render screenshot.
w = maxRes > 0 ? 480 * maxRes : PSP_CoreParameter().renderWidth;
h = maxRes > 0 ? 272 * maxRes : PSP_CoreParameter().renderHeight;
} else if (g_display.rotation != DisplayRotation::ROTATE_0) {