mirror of
https://github.com/mpv-player/mpv
synced 2025-03-22 19:34:14 +00:00
input: fix inverted condition
pthread_equal() returns 0 if the threads are not the same, and somehow I got that wrong. The worst is that I actually explicitly checked the manpage when I wrote this code.
This commit is contained in:
parent
75d7d87e1b
commit
d44dd30ac7
@ -1653,7 +1653,7 @@ bool mp_input_check_interrupt(struct input_ctx *ictx)
|
|||||||
input_lock(ictx);
|
input_lock(ictx);
|
||||||
bool res = test_abort(ictx);
|
bool res = test_abort(ictx);
|
||||||
if (!res && ictx->mainthread_set &&
|
if (!res && ictx->mainthread_set &&
|
||||||
pthread_equal(ictx->mainthread, pthread_self()) == 0)
|
pthread_equal(ictx->mainthread, pthread_self()))
|
||||||
{
|
{
|
||||||
read_events(ictx, 0);
|
read_events(ictx, 0);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user