mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-15 23:06:40 +00:00
Fixup error checking in ALSA.
This commit is contained in:
parent
5a4c51a5cb
commit
d4712d97c9
@ -158,7 +158,7 @@ static ssize_t alsa_write(void *data, const void *buf_, size_t size_)
|
||||
|
||||
break;
|
||||
}
|
||||
else if (frames == -EAGAIN && alsa->nonblock)
|
||||
else if (frames == -EAGAIN && !alsa->nonblock) // Definitely not supposed to happen.
|
||||
{
|
||||
RARCH_WARN("[ALSA]: poll() was signaled, but EAGAIN returned from write.\n"
|
||||
"Your ALSA driver might be subtly broken.\n");
|
||||
@ -171,6 +171,10 @@ static ssize_t alsa_write(void *data, const void *buf_, size_t size_)
|
||||
else
|
||||
return written;
|
||||
}
|
||||
else if (frames == -EAGAIN) // Expected if we're running nonblock.
|
||||
{
|
||||
return written;
|
||||
}
|
||||
else if (frames < 0)
|
||||
{
|
||||
RARCH_ERR("[ALSA]: Unknown error occured (%s).\n", snd_strerror(frames));
|
||||
|
Loading…
Reference in New Issue
Block a user