yuzu-qt: Implement unspecified screenshot ratio
This commit is contained in:
parent
76a03e99b6
commit
96c98d09cb
4 changed files with 30 additions and 11 deletions
|
@ -932,9 +932,13 @@ void GRenderWindow::CaptureScreenshot(const QString& screenshot_path) {
|
|||
: Layout::ScreenUndocked::Height;
|
||||
height *= Settings::values.resolution_info.up_factor;
|
||||
}
|
||||
const u32 width = UISettings::CalculateWidth(
|
||||
height, UISettings::ConvertScreenshotRatioToRatio(
|
||||
UISettings::values.screenshot_aspect_ratio.GetValue()));
|
||||
const auto selected_ratio = UISettings::values.screenshot_aspect_ratio.GetValue();
|
||||
const u32 width =
|
||||
selected_ratio == Settings::ScreenshotAspectRatio::Unspecified
|
||||
? UISettings::values.screenshot_width.GetValue()
|
||||
: UISettings::CalculateWidth(
|
||||
height, UISettings::ConvertScreenshotRatioToRatio(
|
||||
UISettings::values.screenshot_aspect_ratio.GetValue()));
|
||||
return Layout::DefaultFrameLayout(width, height);
|
||||
}()};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue