Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Texture dumping fixes #40

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

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