qt: Add option to apply fullscreen stretching modes when maximized

This commit is contained in:
Cacodemon345
2022-08-10 01:27:54 +06:00
parent f70102c529
commit dd23397854
16 changed files with 69 additions and 4 deletions

View File

@@ -145,6 +145,7 @@ void D3D9Renderer::blit(int x, int y, int w, int h)
return;
}
surfaceInUse = true;
auto origSource = source;
source.setRect(x, y, w, h);
RECT srcRect;
D3DLOCKED_RECT lockRect;
@@ -164,6 +165,7 @@ void D3D9Renderer::blit(int x, int y, int w, int h)
d3d9surface->UnlockRect();
}
else video_blit_complete_monitor(m_monitor_index);
if (origSource != source) onResize(this->width() * devicePixelRatioF(), this->height() * devicePixelRatioF());
surfaceInUse = false;
QTimer::singleShot(0, this, [this] { this->update(); });
}