mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-08-24 15:41:39 +00:00
Support numeric keypad in bytepusher example
This commit is contained in:
committed by
Sam Lantinga
parent
b30cda60c1
commit
1b8c9dc477
@@ -302,6 +302,10 @@ static Uint16 keycode_mask(SDL_Keycode key) {
|
||||
int index;
|
||||
if (key >= SDLK_0 && key <= SDLK_9) {
|
||||
index = key - SDLK_0;
|
||||
} else if (key >= SDLK_KP_1 && key <= SDLK_KP_9) {
|
||||
index = key - SDLK_KP_1 + 1;
|
||||
} else if (key == SDLK_KP_0) {
|
||||
index = 0;
|
||||
} else if (key >= SDLK_A && key <= SDLK_F) {
|
||||
index = key - SDLK_A + 10;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user