summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornanahi <130121847+na-na-hi@users.noreply.github.com>2024-01-20 18:29:31 -0500
committerDudemanguy <random342@airmail.cc>2024-01-21 17:54:57 +0000
commit1ea9e51f782129a82fcf0defdda66c3bcaa6c748 (patch)
tree280eca8652d6d01883f1f37b407c6b2d30bfa0de
parent25bef997ced0365ca5212f40063185e98e0dfa6c (diff)
downloadmpv-1ea9e51f782129a82fcf0defdda66c3bcaa6c748.tar.bz2
mpv-1ea9e51f782129a82fcf0defdda66c3bcaa6c748.tar.xz
win32: stop waiting for messages if the window is destroyed
GetMessageW will indefinitely block after the window is destroyed.
-rw-r--r--video/out/w32_common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/video/out/w32_common.c b/video/out/w32_common.c
index 60452788eb..22278160be 100644
--- a/video/out/w32_common.c
+++ b/video/out/w32_common.c
@@ -1710,7 +1710,7 @@ static bool is_key_message(UINT msg)
static void run_message_loop(struct vo_w32_state *w32)
{
MSG msg;
- while (GetMessageW(&msg, 0, 0, 0) > 0) {
+ while (!w32->destroyed && GetMessageW(&msg, 0, 0, 0) > 0) {
// Change the conversion mode on the first keypress, in case the timer
// solution fails. Note that this leaves the mode indicator in the language
// bar showing the original mode until a key is pressed.