From bac4a012094db4c45e4ecae3b9993f397cd59beb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Fri, 15 Dec 2023 12:35:34 +0100 Subject: [PATCH] Enforce a max size for save state screenshot regardless of resolution mode (auto, skipbuf etc). --- Core/SaveState.cpp | 4 ++-- Core/Screenshot.cpp | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/Core/SaveState.cpp b/Core/SaveState.cpp index 80563be08d33..a01ea6aae612 100644 --- a/Core/SaveState.cpp +++ b/Core/SaveState.cpp @@ -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()); diff --git a/Core/Screenshot.cpp b/Core/Screenshot.cpp index 6bb52cab0834..a1bbaaafc8cf 100644 --- a/Core/Screenshot.cpp +++ b/Core/Screenshot.cpp @@ -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) {