mirror of
https://github.com/dhewm/dhewm3.git
synced 2025-02-17 01:31:47 +00:00
When selecting a texture in Inspectors -> Media -> Textures that doesn't really exist (.mtr defines it, but referenced image files are missing), the game/editor used to crash. The problem was that somehow people thought the best way to communicate that a file wasn't found was by setting the timestamp to 0xFFFFFFFF and then checking for that - sometimes (incorrectly) by comparing it to -1. That worked for 32bit ID_TIME_T (typedefed to time_t), but not with 64bit time_t, which now seems to be the default for Win32 in VS. So I replaced a few -1 and 0xFF... with FILE_NOT_FOUND_TIMESTAMP and now it works. FILE_NOT_FOUND_TIMESTAMP is still defined as 0xFFFFFFFF, maybe I should change that, unsure if that'd break anything though.. When changing it one should keep in mind that time_t might still be 32bit on some platforms (Linux x86?) so that should still work.. (-1 could work) |
||
---|---|---|
.. | ||
cm | ||
d3xp | ||
framework | ||
game | ||
idlib | ||
MayaImport | ||
renderer | ||
sound | ||
sys | ||
tools | ||
TypeInfo | ||
ui | ||
CMakeLists.txt | ||
config.h.in | ||
mmakefile.src |