diff options
author | Lioncash <mathew1800@gmail.com> | 2019-05-29 08:24:29 +0200 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2019-06-03 21:34:32 +0200 |
commit | 77ce85f51d54f96472e1c9797a71c36f2ace72f3 (patch) | |
tree | cca50186def158cb97fa2f364104e6f88ffbe7db /src | |
parent | yuzu/bootmanager: Treat the resolution factor as a u32 (diff) | |
download | yuzu-77ce85f51d54f96472e1c9797a71c36f2ace72f3.tar yuzu-77ce85f51d54f96472e1c9797a71c36f2ace72f3.tar.gz yuzu-77ce85f51d54f96472e1c9797a71c36f2ace72f3.tar.bz2 yuzu-77ce85f51d54f96472e1c9797a71c36f2ace72f3.tar.lz yuzu-77ce85f51d54f96472e1c9797a71c36f2ace72f3.tar.xz yuzu-77ce85f51d54f96472e1c9797a71c36f2ace72f3.tar.zst yuzu-77ce85f51d54f96472e1c9797a71c36f2ace72f3.zip |
Diffstat (limited to 'src')
-rw-r--r-- | src/yuzu/bootmanager.cpp | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/yuzu/bootmanager.cpp b/src/yuzu/bootmanager.cpp index 7818b141f..afec33b61 100644 --- a/src/yuzu/bootmanager.cpp +++ b/src/yuzu/bootmanager.cpp @@ -435,12 +435,17 @@ void GRenderWindow::CaptureScreenshot(u32 res_scale, const QString& screenshot_p const Layout::FramebufferLayout layout{Layout::FrameLayoutFromResolutionScale(res_scale)}; screenshot_image = QImage(QSize(layout.width, layout.height), QImage::Format_RGB32); - renderer.RequestScreenshot(screenshot_image.bits(), - [=] { - screenshot_image.mirrored(false, true).save(screenshot_path); - LOG_INFO(Frontend, "The screenshot is saved."); - }, - layout); + renderer.RequestScreenshot( + screenshot_image.bits(), + [=] { + const std::string std_screenshot_path = screenshot_path.toStdString(); + if (screenshot_image.mirrored(false, true).save(screenshot_path)) { + LOG_INFO(Frontend, "Screenshot saved to \"{}\"", std_screenshot_path); + } else { + LOG_ERROR(Frontend, "Failed to save screenshot to \"{}\"", std_screenshot_path); + } + }, + layout); } void GRenderWindow::OnMinimalClientAreaChangeRequest(std::pair<u32, u32> minimal_size) { |