From a7fb6136ea73cf5b949cd5dda55768dd0bc0870f Mon Sep 17 00:00:00 2001 From: Quinn Date: Sun, 8 Jun 2025 00:59:42 +0200 Subject: [PATCH] fix: renamed some symbols which were causing some compatibility problems __FILE_NAME__ and GLFW_CONTEXT_DEBUG were causing problems in the CI pipeline, thus I deemed them unreliable. __FILE_NAME__ is not __FILE__ which is more universally used across compilers. and GLFW_CONTEXT_DEBUG has been replaced with GLFW_OPENGL_DEBUG_CONTEXT, which is a legacy definition, which plays nicer on older platforms. (like ubuntu) --- src/io/window.c | 2 +- test/test.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/io/window.c b/src/io/window.c index 2f1561c..7c98741 100644 --- a/src/io/window.c +++ b/src/io/window.c @@ -21,7 +21,7 @@ static GLFWwindow* win = NULL; int window_init(void) { #ifndef NDEBUG - glfwWindowHint(GLFW_CONTEXT_DEBUG, GLFW_TRUE); + glfwWindowHint(GLFW_OPENGL_DEBUG_CONTEXT, GLFW_TRUE); #endif // initialize the window diff --git a/test/test.h b/test/test.h index 1a5d2d0..375a43a 100644 --- a/test/test.h +++ b/test/test.h @@ -13,8 +13,8 @@ static inline int assert_helper(int cond, char const* restrict fname, unsigned l return !cond; } -#define assert_true(expr) assert_helper(!!(expr), __FILE_NAME__, __LINE__, __func__, #expr) // evaluation expected to be true -#define assert_false(expr) assert_helper(!(expr), __FILE_NAME__, __LINE__, __func__, #expr) // evaluation expected to be false +#define assert_true(expr) assert_helper(!!(expr), __FILE__, __LINE__, __func__, #expr) // evaluation expected to be true +#define assert_false(expr) assert_helper(!(expr), __FILE__, __LINE__, __func__, #expr) // evaluation expected to be false // contains the data for executing a single test struct testdat {