You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I hold a key down without releasing it, I would expect to start seeing SDL_KEYDOWN events with the repeat field set. I am seeing multiple SDL_KEYDOWN events, however the repeat field is still set to zero. Example:
SDL_Evente;
while (SDL_PollEvent(&e) !=0) {
if (e.type==SDL_KEYDOWN) {
if (e.key.repeat==0) {
printf("new key press\n");
} else {
printf("repeating\n");
}
}
}
When I hold a key down, I'd expect the console to say "new key press" and then spam "repeating". However, I just see lots of spam of "new key press", which means repeat is not being populated correctly.
I'm using Emscripten 3.1.54, which uses SDL 2.26.0. I'm compiling the code with the following command:
emcc main.c -o index.html -sUSE_SDL=2
I'm opening the generated page in Chrome Version 121.0.6167.160 on MacOS 11.7.10.
Possibly related to #21377.
When I hold a key down without releasing it, I would expect to start seeing
SDL_KEYDOWN
events with therepeat
field set. I am seeing multipleSDL_KEYDOWN
events, however therepeat
field is still set to zero. Example:When I hold a key down, I'd expect the console to say "new key press" and then spam "repeating". However, I just see lots of spam of "new key press", which means
repeat
is not being populated correctly.I'm using Emscripten 3.1.54, which uses SDL 2.26.0. I'm compiling the code with the following command:
I'm opening the generated page in Chrome Version 121.0.6167.160 on MacOS 11.7.10.
Version of emscripten/emsdk:
Full link command and output with
-v
appended:log.txt
The text was updated successfully, but these errors were encountered: