mirror of
https://github.com/mpv-player/mpv
synced 2025-04-01 14:50:07 +00:00
win32: stop waiting for messages if the window is destroyed
GetMessageW will indefinitely block after the window is destroyed.
This commit is contained in:
parent
25bef997ce
commit
1ea9e51f78
@ -1710,7 +1710,7 @@ static bool is_key_message(UINT msg)
|
|||||||
static void run_message_loop(struct vo_w32_state *w32)
|
static void run_message_loop(struct vo_w32_state *w32)
|
||||||
{
|
{
|
||||||
MSG msg;
|
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
|
// Change the conversion mode on the first keypress, in case the timer
|
||||||
// solution fails. Note that this leaves the mode indicator in the language
|
// solution fails. Note that this leaves the mode indicator in the language
|
||||||
// bar showing the original mode until a key is pressed.
|
// bar showing the original mode until a key is pressed.
|
||||||
|
Loading…
Reference in New Issue
Block a user