main: fix not receiving text input

This commit is contained in:
takase1121
2025-05-19 08:52:43 +08:00
parent 94b2b28377
commit 7a2214ae0e
+3
View File
@@ -3,6 +3,7 @@
#include <SDL3/SDL.h>
#include <SDL3/SDL_main.h>
#include "api/api.h"
#include "renwindow.h"
#include "rencache.h"
#include "renderer.h"
@@ -197,6 +198,8 @@ init_lua:
#endif
SDL_SetEventEnabled(SDL_EVENT_TEXT_INPUT, true);
SDL_SetEventEnabled(SDL_EVENT_TEXT_EDITING, true);
// ugly hack to get SDL3 to give us text input... in certain conditions
SDL_StartTextInput(window_renderer.window);
const char *init_lite_code = \
"local core\n"