Permalink
Browse files

Merge pull request #11245 from weihuoya/screenshotx2

Add screenshot max resolution limit
  • Loading branch information...
hrydgard committed Jul 9, 2018
2 parents 4020330 + 535def4 commit 7e14a618b42d198d8d1d6fe314f34771c049135c
Showing with 4 additions and 2 deletions.
  1. +4 −2 Core/SaveState.cpp
View
@@ -851,13 +851,15 @@ namespace SaveState
break;
case SAVESTATE_SAVE_SCREENSHOT:
tempResult = TakeGameScreenshot(op.filename.c_str(), ScreenshotFormat::JPG, SCREENSHOT_DISPLAY);
{
int maxRes = g_Config.iInternalResolution > 2 ? 2 : -1;
tempResult = TakeGameScreenshot(op.filename.c_str(), ScreenshotFormat::JPG, SCREENSHOT_DISPLAY, nullptr, nullptr, maxRes);
callbackResult = tempResult ? Status::SUCCESS : Status::FAILURE;
if (!tempResult) {
ERROR_LOG(SAVESTATE, "Failed to take a screenshot for the savestate! %s", op.filename.c_str());
}
break;
}
default:
ERROR_LOG(SAVESTATE, "Savestate failure: unknown operation type %d", op.type);
callbackResult = Status::FAILURE;

0 comments on commit 7e14a61

Please sign in to comment.