expand compatibility header to include path seperators

This commit is contained in:
2025-04-18 21:19:21 +02:00
parent e1915429ca
commit abbb43ab50
2 changed files with 11 additions and 1 deletions

View File

@@ -8,6 +8,16 @@
# error platform not supported! # error platform not supported!
#endif #endif
#ifdef _WIN32
# define PATH_SEP '\\' // contains the path separator as a character. Yes it is extremely annoying that this has to exist.
# define PATH_SEP_STR "\\" // contains the path separator as a string, useful for concatenation. Yes it is extremely annoying that this has to exist.
#else
# define PATH_SEP '/' // contains the path separator as a character. Yes it is extremely annoying that this has to exist.
# define PATH_SEP_STR "/" // contains the path separator as a string, useful for concatenation. Yes it is extremely annoying that this has to exist.
#endif
// define the constants if they haven't been // define the constants if they haven't been
#ifndef F_OK #ifndef F_OK
# define F_OK 0 # define F_OK 0

View File

@@ -165,7 +165,7 @@ audiodata audio_wav_load(audiodevice const* dev, char const* fpath) {
debug("loading audio file '%s'...", fpath); debug("loading audio file '%s'...", fpath);
if (!faccess(fpath, FA_R)) { if (faccess(fpath, FA_R)) {
error("%s:%u audio file either isn't readable or doesn't exist. path: '%s'!", __FILE_NAME__, __LINE__, fpath); error("%s:%u audio file either isn't readable or doesn't exist. path: '%s'!", __FILE_NAME__, __LINE__, fpath);
return (audiodata){0}; return (audiodata){0};
} }