Open milesmj opened 9 months ago
@milesmj Good catch!
That function is used in a few places in less than ideal ways. I think the best solution would be to replace all uses of that function with CMP_GetFileExtension
since it allows for more customization of the result, would reduce a lot duplicated code (like always converting the result of CMP_GetJustFileExt
to upper or lower case), and fix the bug.
I just got this to compile on my apple M1 (arm) laptop, but I had to fix this bug first. I was compressing with bc7 to a ktx or dds texture, and it would always end up stored as uncompressed. I dug into the source and found a bug when detecting if the destination file is compressed or not:
cmp_fileio.cpp
The return from this function expects the '.' to be included, but the alternate code here will strip the '.'. You can see where this function expects the '.' here:
textureio.cpp