git.y1.nz

SameBoy

Accurate GB/GBC emulator
download: https://git.y1.nz/archives/sameboy.tar.gz
README | Files | Log | Refs | LICENSE

commit d48037beec0bd0b39e6fc378f4e394f073ec5392
parent 8fa02e0ea2b4bbb8c0cdc735663a327377662264
Author: Maximilian Mader <max@bastelstu.be>
Date:   Wed, 13 Jul 2022 15:49:52 +0200

Remove `__FILE__` usage in the OpenAL driver

Diffstat:
MSDL/audio/openal.c8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/SDL/audio/openal.c b/SDL/audio/openal.c @@ -17,11 +17,11 @@ static unsigned buffer_pos = 0; #define AL_ERR_STRINGIFY(x) #x #define AL_ERR_TOSTRING(x) AL_ERR_STRINGIFY(x) -#define AL_ERROR(msg) check_al_error(msg, __FILE__ ":" AL_ERR_TOSTRING(__LINE__)) +#define AL_ERROR(msg) check_al_error(msg, AL_ERR_TOSTRING(__LINE__)) // Check if the previous OpenAL call returned an error. // If an error occurred a message will be logged to stderr. -bool check_al_error(const char *user_msg, const char *file) { +bool check_al_error(const char *user_msg, const char *line) { ALCenum error = alGetError(); char *description; @@ -46,10 +46,10 @@ bool check_al_error(const char *user_msg, const char *file) { } if (user_msg != NULL) { - fprintf(stderr, "[%s] %s: %s\n", file, user_msg, description); + fprintf(stderr, "[OpenAL:%s] %s: %s\n", line, user_msg, description); } else { - fprintf(stderr, "[%s] %s\n", file, description); + fprintf(stderr, "[OpenAL:%s] %s\n", line, description); } return true;

This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.