Skip to content

Commit b4e718f

Browse files
committed
Disabled TEXTINPUT events to handle KEYDOWN events.
1 parent 49980df commit b4e718f

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

tests/view_qrcode.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -423,10 +423,10 @@ static void view(int mode, QRinput *input)
423423
default:
424424
break;
425425
}
426-
if(event.type == SDL_QUIT) {
427-
loop = 0;
428-
flag = 0;
429-
}
426+
}
427+
if(event.type == SDL_QUIT) {
428+
loop = 0;
429+
flag = 0;
430430
}
431431
if (event.type == SDL_WINDOWEVENT) {
432432
switch (event.window.event) {
@@ -629,6 +629,8 @@ int main(int argc, char **argv)
629629

630630
SDL_SetRenderDrawColor(renderer, 255, 255, 255, 255);
631631

632+
SDL_StopTextInput();
633+
632634
if(structured && (argc - optind > 1)) {
633635
view_multiText(argv + optind, argc - optind);
634636
} else {

0 commit comments

Comments
 (0)