small fix

This commit is contained in:
2025-09-10 23:29:32 +02:00
parent 9f04e3fab5
commit a202b3ed87
+3 -2
View File
@@ -8,14 +8,15 @@
#include <GLFW/glfw3.h> #include <GLFW/glfw3.h>
void error_callback(int error, const char *description) { void error_callback(int error, const char *description) {
fprintf(stderr, "Error: %s\n", description); fprintf(stderr, "Error %d: %s\n", error, description);
} }
static void key_callback(GLFWwindow *window, int key, int scancode, int action, static void key_callback(GLFWwindow *window, int key, int scancode, int action,
int mods) { int mods) {
if (key == GLFW_KEY_ESCAPE && action == GLFW_PRESS) if (key == GLFW_KEY_ESCAPE && action == GLFW_PRESS) {
glfwSetWindowShouldClose(window, GLFW_TRUE); glfwSetWindowShouldClose(window, GLFW_TRUE);
} }
}
void forge_run(parameters params) { void forge_run(parameters params) {
GLFWwindow *window; GLFWwindow *window;