added input_disconnect_all

pull/15/head
Sara 2023-07-16 17:40:15 +02:00
parent deeaad06e1
commit 25feb8f95f
2 changed files with 6 additions and 0 deletions

View File

@ -189,3 +189,7 @@ int input_get_mousedown(int mousebtn) {
uint32_t mask = SDL_BUTTON(mousebtn); uint32_t mask = SDL_BUTTON(mousebtn);
return (SDL_GetMouseState(NULL, NULL) & mask) != 0; return (SDL_GetMouseState(NULL, NULL) & mask) != 0;
} }
void input_disconnect_all() {
g_key_listeners_endptr = g_key_listeners;
}

View File

@ -30,6 +30,8 @@ extern void input_init();
extern void update_input(); extern void update_input();
extern void input_notify_event(SDL_Event event); extern void input_notify_event(SDL_Event event);
extern void input_disconnect_all();
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif