qt: Fix crashes and freezes when switching to/from Direct3D 9

This commit is contained in:
Cacodemon345
2022-06-24 15:41:24 +06:00
parent e04df80d97
commit 74f86753dd
3 changed files with 23 additions and 8 deletions

View File

@@ -142,6 +142,7 @@ void D3D9Renderer::blit(int x, int y, int w, int h)
video_blit_complete();
return;
}
surfaceInUse = true;
source.setRect(x, y, w, h);
RECT srcRect;
D3DLOCKED_RECT lockRect;
@@ -150,7 +151,6 @@ void D3D9Renderer::blit(int x, int y, int w, int h)
srcRect.left = source.left();
srcRect.right = source.right();
surfaceInUse = true;
if (screenshots) {
video_screenshot((uint32_t *) &(buffer32->line[y][x]), 0, 0, 2048);
}