Skip to content

Conversation

@niligulmohar
Copy link
Contributor

When texture dumping was enabled, it could lead to .fx-files being overwritten. This change fixes the problem and corrects an .ini-file comment.

Texture loading, and thereby texture dumping is performed in a secondary
thread. Both texture dumping and .fx file loading makes calls to
GetDirectoryFile, which returns a pointer to a static buffer. Since these
activities can happen at the same time this is a race condition, and
sometimes .fx files are overwritten with dumped textures.

This change declares the static buffer for GetDirectoryFile as thread
local, which fixes the race condition.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant