From f367ef48a8a0a64bebcaa1c6c7d43f3280125d15 Mon Sep 17 00:00:00 2001 From: odweta Date: Sat, 10 Oct 2026 14:02:50 +0200 Subject: [PATCH] add arrow support to 2048 --- src/examples/2048.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/examples/2048.c b/src/examples/2048.c index a555238..354d9b9 100644 --- a/src/examples/2048.c +++ b/src/examples/2048.c @@ -284,18 +284,22 @@ client_poll_event(void) game_state->is_running = false; break; case SDLK_W: + case SDLK_UP: if (game_status == GAME_PLAYING) slide(UP); break; case SDLK_S: + case SDLK_DOWN: if (game_status == GAME_PLAYING) slide(DOWN); break; case SDLK_A: + case SDLK_LEFT: if (game_status == GAME_PLAYING) slide(LEFT); break; case SDLK_D: + case SDLK_RIGHT: if (game_status == GAME_PLAYING) slide(RIGHT); break;