Skip to content

Commit c6f5a1b

Browse files
Update and rename keyboard.c to device.c
1 parent 3153ea8 commit c6f5a1b

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

code/logic/keyboard.c renamed to code/logic/device.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* Copyright (C) 2024 Fossil Logic. All rights reserved.
1212
* -----------------------------------------------------------------------------
1313
*/
14-
#include "fossil/io/keyboard.h"
14+
#include "fossil/io/device.h"
1515
#include <stdio.h>
1616
#include <stdlib.h>
1717
#include <string.h>
@@ -62,7 +62,7 @@ typedef struct {
6262
size_t count;
6363
} fossil_io_keyboard_manager_t;
6464

65-
static fossil_io_keyboard_manager_t keyboard_manager = { .count = 0 };
65+
static fossil_io_keyboard_manager_t keyboard_manager;
6666
static fossil_io_touch_manager_t touch_manager;
6767
static fossil_io_mouse_manager_t mouse_manager;
6868

@@ -138,6 +138,8 @@ static fossil_io_keyboard_event_t fossil_io_keyboard_get_event(void) {
138138
#endif
139139

140140
void fossil_io_keyboard_init(void) {
141+
memset(&keyboard_manager, 0, sizeof(keyboard_manager));
142+
printf("[mouse] Initialized: bindings cleared\n");
141143
#if defined(_WIN32) || defined(_WIN64)
142144
// Windows doesn't require explicit setup for raw mode.
143145
#else
@@ -147,6 +149,8 @@ void fossil_io_keyboard_init(void) {
147149
}
148150

149151
void fossil_io_keyboard_shutdown(void) {
152+
memset(&keyboard_manager, 0, sizeof(keyboard_manager));
153+
printf("[mouse] Shutdown: bindings released\n");
150154
#if defined(_WIN32) || defined(_WIN64)
151155
// Windows doesn't require explicit cleanup for raw mode.
152156
#else

0 commit comments

Comments
 (0)