Compare commits

...

2 Commits

Author SHA1 Message Date
Iliyas Jorio 83d8e04520 Optional case-sensitive FSSpec 2023-09-19 21:02:57 +02:00
Iliyas Jorio 5358bfea27 User-configurable POMME_DEBUG_ constants 2023-09-19 21:02:36 +02:00
2 changed files with 40 additions and 7 deletions

View File

@ -180,6 +180,18 @@ static bool CaseInsensitiveAppendToPath(
return true;
}
#if POMME_CASE_SENSITIVE_FSSPEC
if (!skipFiles)
{
fs::path candidateResourcePath = naiveConcat;
candidateResourcePath += ".rsrc";
if (fs::is_regular_file(candidateResourcePath))
{
path = naiveConcat;
return true;
}
}
#else
// Convert path element to uppercase for case-insensitive comparisons
const auto uppercaseElement = UppercaseCopy(element);
@ -211,6 +223,7 @@ static bool CaseInsensitiveAppendToPath(
return true;
}
}
#endif
path = naiveConcat;
return false;

View File

@ -6,13 +6,33 @@
#include <sstream>
#include <cstdint>
#define POMME_DEBUG_MEMORY false
#define POMME_DEBUG_SOUND false
#define POMME_DEBUG_PICT false
#define POMME_DEBUG_FILES false
#define POMME_DEBUG_RESOURCES false
#define POMME_DEBUG_INPUT false
#define POMME_DEBUG_3DMF false
#if !defined(POMME_DEBUG_MEMORY)
#define POMME_DEBUG_MEMORY 0
#endif
#if !defined(POMME_DEBUG_SOUND)
#define POMME_DEBUG_SOUND 0
#endif
#if !defined(POMME_DEBUG_PICT)
#define POMME_DEBUG_PICT 0
#endif
#if !defined(POMME_DEBUG_FILES)
#define POMME_DEBUG_FILES 0
#endif
#if !defined(POMME_DEBUG_RESOURCES)
#define POMME_DEBUG_RESOURCES 0
#endif
#if !defined(POMME_DEBUG_INPUT)
#define POMME_DEBUG_INPUT 0
#endif
#if !defined(POMME_DEBUG_3DMF)
#define POMME_DEBUG_3DMF 0
#endif
#define POMME_GENLOG(define, prefix) if (!define) {} else std::cout << "[" << prefix << "] " << __func__ << ":\t"
#define POMME_GENLOG_NOPREFIX(define) if (!define) {} else std::cout