From 3b357348b02fd18a49bf60213171ddbf1a30fd65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Hrdli=C4=8Dka?= Date: Mon, 27 Apr 2020 14:48:35 +0200 Subject: [PATCH] win: Add a timeout for the startblit function --- src/win/win.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/win/win.c b/src/win/win.c index e8d2af475..77df9d3d5 100644 --- a/src/win/win.c +++ b/src/win/win.c @@ -847,7 +847,10 @@ LPARAM win_get_string(int id) void /* plat_ */ startblit(void) { - WaitForSingleObject(ghMutex, INFINITE); + DWORD ret = WaitForSingleObject(ghMutex, 1000); + + if(ret == WAIT_TIMEOUT) + fatal("The blit mutex has timed out."); }