uxn

Varvara Ordinator, written in ANSI C(SDL2)
git clone https://git.eamoncaddigan.net/uxn.git
Log | Files | Refs | README | LICENSE

commit c39d656b52f27bc43f903a279a40d7c6da33737d
parent 9da44f52d492f7c9296ea6b703c6b07a3ff433fc
Author: Devine Lu Linvega <aliceffekt@gmail.com>
Date:   Wed, 14 Feb 2024 15:20:41 -0800

Added support for multi-byte keyboard input

Diffstat:
Msrc/uxnemu.c | 8+++++---
1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/uxnemu.c b/src/uxnemu.c @@ -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));