From dfcc0c0a81b931c22e40e28d03b4f8c49b7893fb Mon Sep 17 00:00:00 2001 From: OBattler Date: Sat, 11 Nov 2017 04:59:22 +0100 Subject: [PATCH] Added two video_wait_for_blit();'s to win_video.c, that should hopefully fix the random Direct3D crashes on resize. --- src/win/win_video.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/win/win_video.c b/src/win/win_video.c index c9a4532c2..6ec436acf 100644 --- a/src/win/win_video.c +++ b/src/win/win_video.c @@ -315,6 +315,7 @@ pclog("PLAT: VID[%d,%d] resizing to %dx%d\n", video_fullscreen, vid_api, x, y); #endif /* First, see if we should resize the UI window. */ if (!vid_resize) { + video_wait_for_blit(); SendMessage(hwndSBAR, SB_GETBORDERS, 0, (LPARAM) sb_borders); GetWindowRect(hwndMain, &r); MoveWindow(hwndRender, 0, 0, x, y, TRUE); @@ -338,6 +339,7 @@ pclog("PLAT: VID[%d,%d] resizing to %dx%d\n", video_fullscreen, vid_api, x, y); /* Now, tell the renderer about the new screen size we want. */ if (vid_apis[video_fullscreen][vid_api].resize) { startblit(); + video_wait_for_blit(); vid_apis[video_fullscreen][vid_api].resize(x, y); endblit(); }