dhewm3/neo
Daniel Gibson d5fd0990a1 Win32: Fix deadlocks if Sys_Printf() or Sys_Error() was called in thread
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().
2021-06-20 03:36:39 +02:00
..
cm Disable Assertions in Release builds 2018-11-11 23:21:23 +01:00
d3xp Fix most (according to warnings) remaining 64bit issues in tool code 2021-05-08 05:43:52 +02:00
framework Fix "Save as" in Particle Editor 2021-05-08 21:05:56 +02:00
game Fix most (according to warnings) remaining 64bit issues in tool code 2021-05-08 05:43:52 +02:00
idlib (Hopefully) better workaround for miscompiled cross products, #147 2021-05-31 21:37:31 +02:00
MayaImport s/LittleLong/LittleInt/ to match the return type 2012-06-28 13:02:47 +02:00
renderer Do gamma correction (r_gamma, r_brightness) in shaders 2021-06-20 03:36:39 +02:00
sound Ignore if stb_vorbis decodes one sample less than expected 2021-06-20 03:36:39 +02:00
sys Win32: Fix deadlocks if Sys_Printf() or Sys_Error() was called in thread 2021-06-20 03:36:39 +02:00
tools Make MFC Tools work with MSAA enabled 2021-05-11 00:39:00 +02:00
TypeInfo Get rid of Sys_FPU_StackIsEmpty() 2012-07-06 01:06:53 +02:00
ui Make rvGEWindowWrapper (for GUI editor) 64bit clean 2021-05-08 07:03:55 +02:00
CMakeLists.txt Fix build if libbacktrace is not installed, update README 2021-06-03 01:38:17 +02:00
config.h.in Introduce CMAKE_INSTALL_PREFIX relative paths 2012-07-04 02:18:42 +02:00
mmakefile.src # move the AROS specific folder icon and default.cfg mmakefile.src under neo/sys/aros/setup 2017-04-22 16:21:14 +02:00