polymod
polymod copied to clipboard
Case-insensitive ZIP loading
This mod shows an interesting problem that is, the modder might not care enough for the letter case of the files, which may cause inconsistent behavior not only in case-sensitive platforms (like Linux) but also when trying to load their mod as a ZIP.
This PR aims to solve at least the ZIP part. I might look into the Linux issue later.
This code seems good but I wonder if the behavior could be made optional (via a compilation flag or similar) since some applications may expect case-sensitive asset loading. Or maybe we could do the opposite and ensure case-sensitive asset loading on Windows.
Done. Now you need to set a POLYMOD_ZIP_INSENSITIVE define to enable it, (although maybe it should be enabled by default?) also it needs #208 to work properly.
Or maybe we could do the opposite and ensure case-sensitive asset loading on Windows.
Definitely would break a mod or two (I know for sure QT: Rewired would be among these as it has a couple of vocals that don't load on Linux). Personally I'm more inclined towards ensuring case-insensitive loading on Linux instead, but up to you.
No idea why but hxcpp is now imploding with this code
Edit: Fixed it, turns out both the getter and the variable needed to have the same exact type...