We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents fc49aa1 + c85a698 commit 89dfdb5Copy full SHA for 89dfdb5
src_c/static.c
@@ -14,6 +14,8 @@
14
#include "pygame.h"
15
#include "Python.h"
16
17
+#include <SDL_ttf.h>
18
+
19
#if defined(__EMSCRIPTEN__)
20
#undef WITH_THREAD
21
#endif
@@ -269,6 +271,12 @@ static struct PyModuleDef mod_pygame_static = {PyModuleDef_HEAD_INIT,
269
271
PyMODINIT_FUNC
270
272
PyInit_pygame_static()
273
{
274
+ // cannot fail here, and font_initialized is already set to 1 in font.c .
275
+ TTF_Init();
276
277
+ // for correct input in wasm worker
278
+ SDL_SetHint("SDL_EMSCRIPTEN_KEYBOARD_ELEMENT", "1");
279
280
load_submodule("pygame", PyInit_base(), "base");
281
load_submodule("pygame", PyInit_constants(), "constants");
282
load_submodule("pygame", PyInit_surflock(), "surflock");
0 commit comments