mirror of
https://github.com/thepigeongenerator/tetris_clone.git
synced 2025-12-17 05:55:46 +01:00
expand compatibility header to include path seperators
This commit is contained in:
@@ -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
|
||||||
|
|||||||
@@ -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};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user