> compile NEMU

221220000 张三
Linux zzy 5.15.146.1-microsoft-standard-WSL2 #1 SMP Thu Jan 11 04:09:03 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
 21:05:55 up 7 days, 21:06,  1 user,  load average: 1.05, 0.95, 0.67
This commit is contained in:
tracer-ics2023
2024-09-25 21:05:55 +08:00
committed by zzy
parent ce5a253eb4
commit 3698b32e72

View File

@ -27,8 +27,8 @@ int SDL_WaitEvent(SDL_Event *event) {
} else if (buf[1] == 'u') { } else if (buf[1] == 'u') {
event->type = SDL_KEYUP; event->type = SDL_KEYUP;
} }
for (int i = 0; i < sizeof(keyname) / sizeof(keyname[0]); i ++ ) { for (int i = 0; i < 83; i ++ ) {
if (strcmp(buf + 3, keyname[i]) == 0) { if (strncmp(buf + 3, keyname[i], strlen(keyname[i])) == 0) {
printf("SDL_WaitEvent Got %s\n", keyname[i]); printf("SDL_WaitEvent Got %s\n", keyname[i]);
event->key.keysym.sym = i; event->key.keysym.sym = i;
return 1; return 1;