mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-13 17:49:29 +01:00
Rework the internal screenshot API, fix bug causing screenshotting to get stuck
This commit is contained in:
1 parent
f2459aa0f4
commit
386fc442a6
13 files changed
+246
-211
No files matched your search
+3
-3
@@ -169,14 +169,14 @@ ReportScreen::ReportScreen(const Path &gamePath)
|
||||
ScreenRenderFlags ReportScreen::PreRender(ScreenRenderMode mode) {
|
||||
if ((mode & ScreenRenderMode::TOP) && !tookScreenshot_ && !g_Config.bSkipBufferEffects) {
|
||||
// We do this in PreRender because we need it to be before the main render pass.
|
||||
// We could do it mid frame, but then we have to reapply viewport/scissor.
|
||||
// We could do it mid-frame, but then we have to reapply viewport/scissor.
|
||||
Path path = GetSysDirectory(DIRECTORY_SCREENSHOT);
|
||||
if (!File::Exists(path)) {
|
||||
File::CreateDir(path);
|
||||
}
|
||||
screenshotFilename_ = path / ".reporting.jpg";
|
||||
ScreenshotResult ignored = TakeGameScreenshot(screenManager()->getDrawContext(), screenshotFilename_, ScreenshotFormat::JPG, SCREENSHOT_RENDER, 4, [this](bool success) {
|
||||
if (success) {
|
||||
ScheduleScreenshot(screenshotFilename_, ScreenshotFormat::JPG, ScreenshotType::Display, 4, [this](ScreenshotResult result) {
|
||||
if (result == ScreenshotResult::Success) {
|
||||
// Redo the views already, now with a screenshot included.
|
||||
RecreateViews();
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user