mirror of
https://git.sr.ht/~rabbits/uxn
synced 2024-11-25 15:25:12 +00:00
Added support for multi-byte keyboard input
This commit is contained in:
parent
9da44f52d4
commit
c39d656b52
1 changed files with 5 additions and 3 deletions
|
@ -362,9 +362,11 @@ handle_events(Uxn *u)
|
|||
else if(event.type == SDL_MOUSEWHEEL)
|
||||
mouse_scroll(u, &u->dev[0x90], event.wheel.x, event.wheel.y);
|
||||
/* Controller */
|
||||
else if(event.type == SDL_TEXTINPUT)
|
||||
controller_key(u, &u->dev[0x80], event.text.text[0]);
|
||||
else if(event.type == SDL_KEYDOWN) {
|
||||
else if(event.type == SDL_TEXTINPUT) {
|
||||
char *c;
|
||||
for(c = event.text.text; *c; c++)
|
||||
controller_key(u, &u->dev[0x80], *c);
|
||||
} else if(event.type == SDL_KEYDOWN) {
|
||||
int ksym;
|
||||
if(get_key(&event))
|
||||
controller_key(u, &u->dev[0x80], get_key(&event));
|
||||
|
|
Loading…
Reference in a new issue