fix if statement in SDL sound driver #396
@denisfa found this due to a warning, this should improve the functionality of the SDL sound driver. Signed-off-by: Rafael Kitover <rkitover@gmail.com>
This commit is contained in:
parent
41ee35f22e
commit
d9a7df6105
|
@ -60,11 +60,12 @@ void SoundSDL::read(uint16_t* stream, int length) {
|
||||||
if (!initialized || !emulating)
|
if (!initialized || !emulating)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!buffer_size())
|
if (!buffer_size()) {
|
||||||
if (should_wait())
|
if (should_wait())
|
||||||
SDL_SemWait(data_available);
|
SDL_SemWait(data_available);
|
||||||
else
|
else
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
SDL_LockMutex(mutex);
|
SDL_LockMutex(mutex);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue