viewer: adjust viewport by device pixel ratio

Fixes #1377
This commit is contained in:
itsmattkc
2020-11-19 11:05:51 +11:00
parent 3f36eb9315
commit b463c5e6a5
+5 -1
View File
@@ -299,8 +299,12 @@ void ViewerDisplayWidget::OnPaint()
}
// Draw texture through color transform
int device_width = width() * devicePixelRatioF();
int device_height = height() * devicePixelRatioF();
VideoParams::Format device_format = static_cast<VideoParams::Format>(Config::Current()["OfflinePixelFormat"].toInt());
renderer()->BlitColorManaged(color_service(), texture_, true,
VideoParams(width(), height(), static_cast<VideoParams::Format>(Config::Current()["OfflinePixelFormat"].toInt()), VideoParams::kInternalChannelCount),
VideoParams(device_width, device_height, device_format, VideoParams::kInternalChannelCount),
GetCompleteMatrixFlippedYTranslation());
}