GUIFormspecMenu: Fix race condition between quit event and cleanup in…
… Game (#14010) To not instantly free GUIFormSpec upon close/quit, Game periodically cleans up the remaining instance on the next frame. When a new formspec is received and processed after closing the previous formspec but before the cleanup in Game, the formspec would be closed regardless. This now re-creates the formspec when the old one is already pending for removal.
Try to fix safeWriteToFile producing empty files on Windows (#14085)
Use win32 APIs to write the temporary file before copying to the final destination. Because we've observed the final file being empty, we suspect that std::ostream::flush is not flushing. Also add a test for it.
The code relied on touch IDs being consecutive. This is true on Android, but not on Linux. Therefore, touch input on Linux was broken since 53886dc.
Fix logic in porting::attachOrCreateConsole()
No functional change but now the comment is actually correct.
ContentCAO: Fix threshold of alpha channel textures (#14213)
With disabled shaders, the material EMT_TRANSPARENT_ALPHA_CHANNEL uses the parameter as an alpha threshold to decide whether to draw the texture. Thus lowering this limit fixes the issue of vanishing textures below alpha 128.