Fix blit thread related deadlocks

Removed unnecessary calls to video_wait_for_blit(), which in
addition to not doing much were also in a race with the
video_blit_memtoscreen() thread to wait for and reset the
blit_data.blit_complete event signalled by blit_thread(),
causing several deadlocks.
This commit is contained in:
luisjoseromero
2020-12-22 00:19:45 +00:00
parent 9e80f60db7
commit 4b42251b84
2 changed files with 0 additions and 7 deletions

View File

@@ -719,7 +719,6 @@ plat_setvid(int api)
win_log("Initializing VIDAPI: api=%d\n", api); win_log("Initializing VIDAPI: api=%d\n", api);
startblit(); startblit();
video_wait_for_blit();
/* Close the (old) API. */ /* Close the (old) API. */
vid_apis[vid_api].close(); vid_apis[vid_api].close();
@@ -750,7 +749,6 @@ plat_vidsize(int x, int y)
if (!vid_api_inited || !vid_apis[vid_api].resize) return; if (!vid_api_inited || !vid_apis[vid_api].resize) return;
startblit(); startblit();
video_wait_for_blit();
vid_apis[vid_api].resize(x, y); vid_apis[vid_api].resize(x, y);
endblit(); endblit();
} }
@@ -764,7 +762,6 @@ plat_vidapi_enable(int enable)
if (!vid_api_inited || !vid_apis[vid_api].enable) if (!vid_api_inited || !vid_apis[vid_api].enable)
return; return;
video_wait_for_blit();
vid_apis[vid_api].enable(enable != 0); vid_apis[vid_api].enable(enable != 0);
if (! i) if (! i)
@@ -803,7 +800,6 @@ plat_setfullscreen(int on)
} }
/* OK, claim the video. */ /* OK, claim the video. */
video_wait_for_blit();
win_mouse_close(); win_mouse_close();
/* Close the current mode, and open the new one. */ /* Close the current mode, and open the new one. */

View File

@@ -166,7 +166,6 @@ static void
video_toggle_option(HMENU h, int *val, int id) video_toggle_option(HMENU h, int *val, int id)
{ {
startblit(); startblit();
video_wait_for_blit();
*val ^= 1; *val ^= 1;
CheckMenuItem(h, id, *val ? MF_CHECKED : MF_UNCHECKED); CheckMenuItem(h, id, *val ? MF_CHECKED : MF_UNCHECKED);
endblit(); endblit();
@@ -1467,8 +1466,6 @@ plat_resize(int x, int y)
/* First, see if we should resize the UI window. */ /* First, see if we should resize the UI window. */
if (!vid_resize) { if (!vid_resize) {
video_wait_for_blit();
/* scale the screen base on DPI */ /* scale the screen base on DPI */
if (dpi_scale) { if (dpi_scale) {