summaryrefslogtreecommitdiff
path: root/callbacks.c
diff options
context:
space:
mode:
authorPeter Fors <peter.fors@mindkiller.com>2025-05-24 15:45:54 +0200
committerPeter Fors <peter.fors@mindkiller.com>2025-05-24 15:45:54 +0200
commita8e0c141b0184d629504b9f0ee8dbc4fefb90934 (patch)
treecff0f7e64ce58dc8f1e4ff4501743d9b94449c94 /callbacks.c
parente28ad1546509de31b706f0fd300a906e5bc55199 (diff)
3011fps
Diffstat (limited to 'callbacks.c')
-rw-r--r--callbacks.c24
1 files changed, 0 insertions, 24 deletions
diff --git a/callbacks.c b/callbacks.c
index 6b62ea6..f32c59d 100644
--- a/callbacks.c
+++ b/callbacks.c
@@ -51,30 +51,6 @@ static void key_callback(GLFWwindow *window, int key, int scancode, int action,
}
}
- if(action == GLFW_PRESS) {
- switch(key) {
- case GLFW_KEY_X: nes_state->ppu.input[0] |= (1 << 0); break; // A
- case GLFW_KEY_Z: nes_state->ppu.input[0] |= (1 << 1); break; // B
- case GLFW_KEY_SPACE: nes_state->ppu.input[0] |= (1 << 2); break; // Select
- case GLFW_KEY_ENTER: nes_state->ppu.input[0] |= (1 << 3); break; // Start
- case GLFW_KEY_UP: nes_state->ppu.input[0] |= (1 << 4); break;
- case GLFW_KEY_DOWN: nes_state->ppu.input[0] |= (1 << 5); break;
- case GLFW_KEY_LEFT: nes_state->ppu.input[0] |= (1 << 6); break;
- case GLFW_KEY_RIGHT: nes_state->ppu.input[0] |= (1 << 7); break;
- }
- } else if(action == GLFW_RELEASE) {
- switch(key) {
- case GLFW_KEY_X: nes_state->ppu.input[0] &= ~(1 << 0); break;
- case GLFW_KEY_Z: nes_state->ppu.input[0] &= ~(1 << 1); break;
- case GLFW_KEY_SPACE: nes_state->ppu.input[0] &= ~(1 << 2); break;
- case GLFW_KEY_ENTER: nes_state->ppu.input[0] &= ~(1 << 3); break;
- case GLFW_KEY_UP: nes_state->ppu.input[0] &= ~(1 << 4); break;
- case GLFW_KEY_DOWN: nes_state->ppu.input[0] &= ~(1 << 5); break;
- case GLFW_KEY_LEFT: nes_state->ppu.input[0] &= ~(1 << 6); break;
- case GLFW_KEY_RIGHT: nes_state->ppu.input[0] &= ~(1 << 7); break;
- }
- }
-
if(action == GLFW_RELEASE) {
switch(key) {
case GLFW_KEY_F12: {