Skip to content

Input issues in emscripten #12073

Closed
Closed
@vinnyhorgan

Description

@vinnyhorgan

Hi! Really appreciate all your work here!

I have been porting my game project to SDL3 (using release 3.2.0 now), and today I tried rebuilding for the web.
Everything seems to work as on desktop except for: keydown and textinput events. I am using cmake to build the project.
For some reason, if i build using cmake's debug type, everything works. When I switch to release or minsizerel, keydown and textinput events start to double. When I press a button, two keydown events and two textinput events get registered in the same frame. I have added a check to see if it's the second event of the frame to avoid the issue for now.

I tried creating a fresh bare bones project and the issue still manifests, in this fresh project, in release build, textinput events are not registered at all! (yes i have called starttextinput). The issue doesn't seem to affect any other event (at least in my testing).

Some details that might be useful: the test project is a very simple hello world, it also uses a renderer with vsync enabled and I am using the default html emscripten shell.

Thanks a lot!

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions