mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-07-05 21:17:54 -05:00
bootmanager: Fix screenshot resolution factor usage
Fixes screenshots at non integer scaling
This commit is contained in:
@ -628,11 +628,9 @@ void GRenderWindow::ReleaseRenderTarget() {
|
||||
main_context.reset();
|
||||
}
|
||||
|
||||
void GRenderWindow::CaptureScreenshot(u32 res_scale, const QString& screenshot_path) {
|
||||
VideoCore::RendererBase& renderer = system.Renderer();
|
||||
if (res_scale == 0) {
|
||||
res_scale = VideoCore::GetResolutionScaleFactor(renderer);
|
||||
}
|
||||
void GRenderWindow::CaptureScreenshot(const QString& screenshot_path) {
|
||||
auto& renderer = system.Renderer();
|
||||
const f32 res_scale = VideoCore::GetResolutionScaleFactor(renderer);
|
||||
|
||||
const Layout::FramebufferLayout layout{Layout::FrameLayoutFromResolutionScale(res_scale)};
|
||||
screenshot_image = QImage(QSize(layout.width, layout.height), QImage::Format_RGB32);
|
||||
|
@ -178,7 +178,7 @@ public:
|
||||
|
||||
bool IsLoadingComplete() const;
|
||||
|
||||
void CaptureScreenshot(u32 res_scale, const QString& screenshot_path);
|
||||
void CaptureScreenshot(const QString& screenshot_path);
|
||||
|
||||
std::pair<u32, u32> ScaleTouch(const QPointF& pos) const;
|
||||
|
||||
|
@ -163,7 +163,7 @@ void MicroProfileWidget::mouseReleaseEvent(QMouseEvent* ev) {
|
||||
}
|
||||
|
||||
void MicroProfileWidget::wheelEvent(QWheelEvent* ev) {
|
||||
const auto wheel_position = ev->position().toPoint();
|
||||
const auto wheel_position = ev->pos();
|
||||
MicroProfileMousePosition(wheel_position.x() / x_scale, wheel_position.y() / y_scale,
|
||||
ev->angleDelta().y() / 120);
|
||||
ev->accept();
|
||||
|
@ -2892,8 +2892,7 @@ void GMainWindow::OnCaptureScreenshot() {
|
||||
}
|
||||
}
|
||||
#endif
|
||||
render_window->CaptureScreenshot(UISettings::values.screenshot_resolution_factor.GetValue(),
|
||||
filename);
|
||||
render_window->CaptureScreenshot(filename);
|
||||
}
|
||||
|
||||
// TODO: Written 2020-10-01: Remove per-game config migration code when it is irrelevant
|
||||
|
@ -68,7 +68,6 @@ struct Values {
|
||||
Settings::BasicSetting<bool> enable_discord_presence{true, "enable_discord_presence"};
|
||||
|
||||
Settings::BasicSetting<bool> enable_screenshot_save_as{true, "enable_screenshot_save_as"};
|
||||
Settings::BasicSetting<u16> screenshot_resolution_factor{0, "screenshot_resolution_factor"};
|
||||
|
||||
QString roms_path;
|
||||
QString symbols_path;
|
||||
|
Reference in New Issue
Block a user