[Since release] Blood: No sound under Linux.

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: [Since release] Blood: No sound under Linux.

Re: [Since release] Blood: No sound under Linux.

by mjr4077au » Thu Oct 15, 2020 12:42 pm

I've amended Graf's work so even LoLwAcKy names get picked up, but only the first resulting match. However if the path going into D_AddFiles() is spot on, it'll use that instead of doing a case insensitive search in the directory for a match.

Link to code: https://github.com/coelckers/Raze/blob/ ... #L207-L252

Re: [Since release] Blood: No sound under Linux.

by wildweasel » Thu Oct 15, 2020 11:12 am

The only exception I'd think of to the above point, is if a popular distribution of the game (for some reason) decides to change the capitalization of the file names. We've probably covered the Steam and GOG releases pretty well, sure, but suppose (hypothetically) another big-name distributor comes along and puts up their version, and the filenames are all funky-capitals. Raze's code would suddenly have a need to check for that.

Re: [Since release] Blood: No sound under Linux.

by sinisterseed » Thu Oct 15, 2020 11:06 am

Gez wrote:
mjr4077au wrote:The first option would be best I reckon. If you go for the second, you'll have some edge case where it's named bLoOd.RfF or something and it'll get missed.
The people who would capitalize their files in LoLwAcKy casing deserve to have their games not work.

Checking the three casing schemes that make sense (ALLCAPS, nocaps, Initial) should be good enough, I think it's what ZDoom does with IWAD names.
Honestly I agree.

If you choose to name your files in stupid ways, thdn don't get surprised when they stop getting picked up.

Re: [Since release] Blood: No sound under Linux.

by Gez » Thu Oct 15, 2020 8:42 am

mjr4077au wrote:The first option would be best I reckon. If you go for the second, you'll have some edge case where it's named bLoOd.RfF or something and it'll get missed.
The people who would capitalize their files in LoLwAcKy casing deserve to have their games not work.

Checking the three casing schemes that make sense (ALLCAPS, nocaps, Initial) should be good enough, I think it's what ZDoom does with IWAD names.

Re: [Since release] Blood: No sound under Linux.

by mjr4077au » Tue Oct 13, 2020 4:01 pm

That's all good, I wasn't complaining or anything :). Because I know where the fix needed to be applied, I can work on this further tonight. Ran out of steam not long after sending my report through as I haven't been sleeping well.

Re: [Since release] Blood: No sound under Linux.

by Graf Zahl » Tue Oct 13, 2020 5:14 am

Yes, sure. Stuff like this happens if it cannot be tested.

Re: [Since release] Blood: No sound under Linux.

by mjr4077au » Tue Oct 13, 2020 4:44 am

Unfortunately this didn't work. What its doing is actually changing the case on the entire path and not just the filename:

Code: Select all

made it
checks: /home/mrichters/.config/raze/Blood/SOUNDS.RFF
first if
checks: /home/mrichters/.config/raze/blood/sounds.rff
second if
checks: /HOME/MRICHTERS/.CONFIG/RAZE/BLOOD/SOUNDS.RFF
third if
checks: /home/mrichters/.config/raze/Blood/SOUNDS.RFF
Can't find '/home/mrichters/.config/raze/Blood/SOUNDS.RFF'
Should I split the string on the last slash then concatenate the found filename in the given path?

Re: [Since release] Blood: No sound under Linux.

by mjr4077au » Mon Oct 12, 2020 1:16 pm

Legend, I'll test it out tonight ๐Ÿ˜๐Ÿ˜

Re: [Since release] Blood: No sound under Linux.

by Graf Zahl » Mon Oct 12, 2020 12:01 pm

I added some code to the function in question to check pure lowecase and uppercase variants of the given file name as well if it cannot be found as-is.
(Can't test it myself, of course. ;))

Re: [Since release] Blood: No sound under Linux.

by Rachael » Wed Sep 16, 2020 5:38 pm

Agreed. I was just weighing robustness and simplicity. :)

Re: [Since release] Blood: No sound under Linux.

by mjr4077au » Wed Sep 16, 2020 5:37 pm

The first option would be best I reckon. If you go for the second, you'll have some edge case where it's named bLoOd.RfF or something and it'll get missed.

Re: [Since release] Blood: No sound under Linux.

by Rachael » Wed Sep 16, 2020 5:35 pm

One idea to fix it is to query the entire folder into a string list and then doing a non-case compare with the list, and if a match is found use that entry. There may already be a facility to do this already within Raze's backend (i.e. the way it finds .GRP files). This might be the most robust way to fix it.

There's also the "easy" way, i.e. query Blood.rff, BLOOD.RFF, blood.rff.

Re: [Since release] Blood: No sound under Linux.

by mjr4077au » Wed Sep 16, 2020 5:34 pm

Heh, agreed so I thought I'd ask the collective about it :)

Re: [Since release] Blood: No sound under Linux.

by Rachael » Wed Sep 16, 2020 5:33 pm

In my opinion "POSIX" and "correct" are not directly synonymous.

Re: [Since release] Blood: No sound under Linux.

by mjr4077au » Wed Sep 16, 2020 4:21 pm

Thoughts on closing this one off? It's correct in a POSIX sense that the file is case-sensitive as it's a case-sensitive environment, however it's incorrect in the sense that I don't think a user should have to think about it.

Top