mirror of
https://github.com/thepigeongenerator/mcaselector-lite.git
synced 2025-12-18 09:45:45 +01:00
move windowing code into io/win
This commit is contained in:
15
src/io/win/input.c
Normal file
15
src/io/win/input.c
Normal file
@@ -0,0 +1,15 @@
|
||||
/* Copyright (c) 2025 Quinn.
|
||||
* This is a file from the project MCA-Selector-Lite and is
|
||||
* licensed under the MIT Licence. See the project's LICENSE file for details. */
|
||||
#include "input.h"
|
||||
|
||||
#include <GLFW/glfw3.h>
|
||||
|
||||
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)
|
||||
glfwSetWindowShouldClose(win, 1);
|
||||
#endif
|
||||
}
|
||||
Reference in New Issue
Block a user