Core: Refactor screenshot saving.

So we can reuse the actual saving.
This commit is contained in:
Unknown W. Brackets committed 2017-12-21 15:44:49 -08:00
1 parent fe45a059b5
commit 79dc857527
5 files changed
+48 -48

No files matched your search

+1 -1
View File
@@ -247,7 +247,7 @@ void ReportScreen::CreateViews() {
}
screenshotFilename_ = path + ".reporting.jpg";
int shotWidth = 0, shotHeight = 0;
if (TakeGameScreenshot(screenshotFilename_.c_str(), SCREENSHOT_JPG, SCREENSHOT_DISPLAY, &shotWidth, &shotHeight, 4)) {
if (TakeGameScreenshot(screenshotFilename_.c_str(), ScreenshotFormat::JPG, SCREENSHOT_DISPLAY, &shotWidth, &shotHeight, 4)) {
float scale = 340.0f * (1.0f / g_dpi_scale_y) * (1.0f / shotHeight);
leftColumnItems->Add(new CheckBox(&includeScreenshot_, rp->T("FeedbackIncludeScreen", "Include a screenshot")))->SetEnabledPtr(&enableReporting_);
screenshot_ = leftColumnItems->Add(new AsyncImageFileView(screenshotFilename_, IS_DEFAULT, nullptr, new LinearLayoutParams(shotWidth * scale, shotHeight * scale, Margins(12, 0))));