Skip to content

Commit 83857f6

Browse files
Update keyboard.c
1 parent 3ce7b43 commit 83857f6

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

code/logic/keyboard.c

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -232,11 +232,14 @@ void fossil_io_mouse_poll_events(void) {
232232
}
233233

234234
void fossil_io_mouse_init(void) {
235-
printf("[mouse] Initialized\n");
235+
memset(&mouse_manager, 0, sizeof(mouse_manager));
236+
printf("[mouse] Initialized: %zu bindings cleared\n", mouse_manager.count);
236237
}
237238

238239
void fossil_io_mouse_shutdown(void) {
239-
printf("[mouse] Shutdown\n");
240+
size_t released = mouse_manager.count;
241+
memset(&mouse_manager, 0, sizeof(mouse_manager));
242+
printf("[mouse] Shutdown: %zu bindings released\n", released);
240243
}
241244

242245
// TOUCH
@@ -295,9 +298,12 @@ void fossil_io_touch_poll_events(void) {
295298
}
296299

297300
void fossil_io_touch_init(void) {
298-
printf("[touch] Initialized\n");
301+
memset(&touch_manager, 0, sizeof(touch_manager));
302+
printf("[touch] Initialized: %zu bindings cleared\n", touch_manager.count);
299303
}
300304

301305
void fossil_io_touch_shutdown(void) {
302-
printf("[touch] Shutdown\n");
306+
size_t released = touch_manager.count;
307+
memset(&touch_manager, 0, sizeof(touch_manager));
308+
printf("[touch] Shutdown: %zu bindings released\n", released);
303309
}

0 commit comments

Comments
 (0)