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

Fix sound access case sensitivity #150

Merged
merged 1 commit into from
Jun 18, 2024

Conversation

kamaradclimber
Copy link

On case sensitive filesystems (on Linux at least), access to sound was broken for some assets.

This commit fixes all errors similar to:

Sound: cant find audio AUDIO/Wavs/DOCK1.wav
that happen when opening the game

This is related to #144

On case sensitive filesystems (on Linux at least), access to sound was
broken for some assets.

This commit fixes all errors similar to:
> Sound: cant find audio AUDIO/Wavs/DOCK1.wav
that happen when opening the game

This is related to dalerank#144
@dalerank
Copy link
Owner

Thanks, I think it better to use sequence for foldersv(wavs, Wavs) when files can be found
and WAV, wav, MP3, mp3 for extension
because original files has different case
Another way - when start first time on any system convert all files in those folder to lower case

@dalerank
Copy link
Owner

Yet another way create list of files from those folders
and look for real path in stricmp mode
before start game collect all files from Wavs, Sound etc
when try open wavs/sound.wav -> looking in this list and return Wavs/SOUND.wav real path
open file with real path
it much better than hardcode path in configs
@kamaradclimber can you create this work?

@kamaradclimber
Copy link
Author

Thanks for your feedback.
I agree it would be better to avoid hardcode paths. However, I assume the assets are not changing (and have not changed since the release of the game) so do we really need to make the code robust to case change?

@dalerank
Copy link
Owner

hm, it make sense. ok, aproved

@dalerank dalerank merged commit 2cf8c78 into dalerank:master Jun 18, 2024
3 of 5 checks passed
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.

None yet

2 participants