diff --git a/src/util/compat.h b/src/util/compat.h index 644a14a..b4f0651 100644 --- a/src/util/compat.h +++ b/src/util/compat.h @@ -8,6 +8,16 @@ # error platform not supported! #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 #ifndef F_OK # define F_OK 0 diff --git a/src/window/audio.c b/src/window/audio.c index e680de5..5dc4ac6 100644 --- a/src/window/audio.c +++ b/src/window/audio.c @@ -165,7 +165,7 @@ audiodata audio_wav_load(audiodevice const* dev, char const* 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); return (audiodata){0}; }