Qt: Fix HiDPI scaling on non-software renderers

This commit is contained in:
Cacodemon345
2025-03-30 21:03:46 +06:00
parent 512154e4a8
commit 8f94ccec80
6 changed files with 35 additions and 27 deletions

View File

@@ -846,6 +846,7 @@ VulkanWindowRenderer::createRenderer()
void
VulkanWindowRenderer::resizeEvent(QResizeEvent *event)
{
this->pixelRatio = devicePixelRatio();
onResize(width(), height());
QVulkanWindow::resizeEvent(event);
@@ -868,8 +869,10 @@ VulkanWindowRenderer::onBlit(int buf_idx, int x, int y, int w, int h)
if (isExposed())
requestUpdate();
buf_usage[0].clear();
if (origSource != source)
if (origSource != source) {
this->pixelRatio = devicePixelRatio();
onResize(this->width(), this->height());
}
}
uint32_t