mirror of
https://github.com/thepigeongenerator/mcaselector-lite.git
synced 2025-12-16 19:45:46 +01:00
rename input callback to something more appropriate.
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
|
||||
#include <GLFW/glfw3.h>
|
||||
|
||||
void key_callback(GLFWwindow *win, int key, int scancode, int action, int mods) {
|
||||
void input_callback(GLFWwindow *win, int key, int scancode, int action, int mods) {
|
||||
(void)win, (void)key, (void)scancode, (void)action, (void)mods; // make the compiler shut up as this is fine
|
||||
#ifndef NDEBUG
|
||||
if (key == GLFW_KEY_ESCAPE && action == GLFW_PRESS)
|
||||
|
||||
@@ -4,4 +4,6 @@
|
||||
|
||||
#include <GLFW/glfw3.h>
|
||||
|
||||
void key_callback(GLFWwindow *win, int key, int scancode, int action, int mods);
|
||||
/* Handles incoming key inputs for `win`.
|
||||
* Intended to be given as an argument to `glfwSetKeyCallback`. */
|
||||
void input_callback(GLFWwindow *win, int key, int scancode, int action, int mods);
|
||||
|
||||
@@ -41,8 +41,7 @@ int window_init(void) {
|
||||
if (!gladLoadGL(glfwGetProcAddress)) return 1;
|
||||
glfwSwapInterval(1); // wait 1 screen update for a redraw a.k.a. "vsync". (not really applicable in this case but eh)
|
||||
|
||||
// configure callbacks
|
||||
glfwSetKeyCallback(win, key_callback);
|
||||
glfwSetKeyCallback(win, input_callback);
|
||||
|
||||
// print the OpenGL version information
|
||||
debug(
|
||||
|
||||
Reference in New Issue
Block a user