mirror of
https://github.com/dhewm/dhewm3.git
synced 2024-11-26 22:31:17 +00:00
d5fd0990a1
If those functions (e.g. called by common->Printf(), common->Error()) weren't called from the mainthread and win_outputEditString was set to 1, a deadlock could occur. Specifically, the async thread (handling sound) was calling common->Warning() -> Sys_Printf() -> Conbuf_AppendText() which called SendMessageA() which blocks until the main thread handles the message. The main thread however was in idSampleDecoderLocal::Decode() trying to enter CRITICAL_SECTION_ONE, which was held by the async thread (it's used to synchronize sound handling between main and async thread). So now if Sys_Printf() (or Sys_Error() which should have the same problem) is not called by the main thread, the text is buffered and Conbuf_AppendText() is called for the buffered lines in the next frame in Win_Frame(). |
||
---|---|---|
.. | ||
cm | ||
d3xp | ||
framework | ||
game | ||
idlib | ||
MayaImport | ||
renderer | ||
sound | ||
sys | ||
tools | ||
TypeInfo | ||
ui | ||
CMakeLists.txt | ||
config.h.in | ||
mmakefile.src |