Textbox input runs callbacks

This commit is contained in:
Yousef Khadadeh 2026-04-02 10:15:22 +03:00
parent f90cf5b026
commit d89aabff81
13 changed files with 59 additions and 13 deletions

View file

@ -558,6 +558,9 @@ SDL_AppResult SDL_AppInit(void **appstate, int argc, char **argv) {
}, true);
}
}
mS.m->update(); // Run update once to make sure that callbacks dont crash
#ifdef NDEBUG
}
catch(const std::exception& e) {
@ -749,7 +752,7 @@ SDL_AppResult SDL_AppEvent(void *appstate, SDL_Event *event) {
mS.m->input.backend_key_up_update(event->key);
break;
case SDL_EVENT_TEXT_INPUT:
mS.m->input.text.add_text_to_textbox(event->text.text);
mS.m->input.add_text_to_textbox(event->text.text);
break;
case SDL_EVENT_DROP_FILE:
mS.m->update_scale_and_density();