fix freeze on shutdown
commit64d6610adeb4aba35fe2a7defc87aee85d3f49b1
authorrofl0r <retnyg@gmx.net>
Mon, 27 Nov 2017 01:06:07 +0000 (27 01:06 +0000)
committerrofl0r <retnyg@gmx.net>
Mon, 27 Nov 2017 01:06:07 +0000 (27 01:06 +0000)
treeee7d38aa48c5c93fb70e145714beb20379dfc9fb
parent3b2642a0e405d12bf186e9a3a3798d9524dc99a2
fix freeze on shutdown

closing the sdl audio subsystem would fail since the callback was
still waiting for a lock.

this bug was introduced in 0fda42d20818d2e2ff0261a91ba73bc148bba13f
"patch by deathpudding", the latest commit done by pokemonhacker.

that patch introduced 3 different locks, which seems over-engineered
and it's possible that it is the reason for the stuttering sound
i experience, and maybe even for the recurring hangs (every ~15 sec,
the emulator hangs for like half a second).

usually when i see a comment in code like "patch by randomgamer"
the alarmbell rings, since most of them are idiots... and especially
those that spray their nickname all over the place...
so it may well be that reverting that patch fixes several issues.
src/sdl/SDL.c