12
12
* -----------------------------------------------------------------------------
13
13
*/
14
14
#include "fossil/io/device.h"
15
+ #include "fossil/io/output.h"
15
16
#include <stdio.h>
16
17
#include <stdlib.h>
17
18
#include <string.h>
@@ -139,7 +140,6 @@ static fossil_io_keyboard_event_t fossil_io_keyboard_get_event(void) {
139
140
140
141
void fossil_io_keyboard_init (void ) {
141
142
memset (& keyboard_manager , 0 , sizeof (keyboard_manager ));
142
- printf ("[mouse] Initialized: bindings cleared\n" );
143
143
#if defined(_WIN32 ) || defined(_WIN64 )
144
144
// Windows doesn't require explicit setup for raw mode.
145
145
#else
@@ -150,7 +150,6 @@ void fossil_io_keyboard_init(void) {
150
150
151
151
void fossil_io_keyboard_shutdown (void ) {
152
152
memset (& keyboard_manager , 0 , sizeof (keyboard_manager ));
153
- printf ("[mouse] Shutdown: bindings released\n" );
154
153
#if defined(_WIN32 ) || defined(_WIN64 )
155
154
// Windows doesn't require explicit cleanup for raw mode.
156
155
#else
@@ -168,7 +167,7 @@ void fossil_io_keyboard_register_binding(fossil_io_keyboard_event_t event, fossi
168
167
keyboard_manager .bindings [keyboard_manager .count ].callback = callback ;
169
168
keyboard_manager .count ++ ;
170
169
} else {
171
- fprintf ( stderr , "Max keybindings reached.\n" );
170
+ fossil_io_fprintf ( FOSSIL_STDERR , "Max keybindings reached.\n" );
172
171
}
173
172
}
174
173
@@ -185,7 +184,7 @@ void fossil_io_keyboard_unregister_binding(fossil_io_keyboard_event_t event) {
185
184
return ;
186
185
}
187
186
}
188
- fprintf ( stderr , "No matching keybinding to unregister.\n" );
187
+ fossil_io_fprintf ( FOSSIL_STDERR , "No matching keybinding to unregister.\n" );
189
188
}
190
189
191
190
void fossil_io_keyboard_poll_events (void ) {
@@ -228,7 +227,7 @@ static void fossil_io_mouse_get_event(fossil_io_mouse_event_t* event) {
228
227
229
228
void fossil_io_mouse_register_binding (fossil_io_mouse_event_t event , fossil_io_mouse_callback_t callback ) {
230
229
if (mouse_manager .count >= MAX_MOUSEBINDS ) {
231
- fprintf ( stderr , "[mouse] Max bindings reached\n" );
230
+ fossil_io_fprintf ( FOSSIL_STDERR , "[mouse] Max bindings reached\n" );
232
231
return ;
233
232
}
234
233
@@ -244,7 +243,7 @@ void fossil_io_mouse_unregister_binding(fossil_io_mouse_event_t event) {
244
243
return ;
245
244
}
246
245
}
247
- fprintf ( stderr , "[mouse] Binding not found\n" );
246
+ fossil_io_fprintf ( FOSSIL_STDERR , "[mouse] Binding not found\n" );
248
247
}
249
248
250
249
void fossil_io_mouse_poll_events (void ) {
@@ -269,12 +268,10 @@ void fossil_io_mouse_clear_bindings(void) {
269
268
270
269
void fossil_io_mouse_init (void ) {
271
270
memset (& mouse_manager , 0 , sizeof (mouse_manager ));
272
- printf ("[mouse] Initialized: bindings cleared\n" );
273
271
}
274
272
275
273
void fossil_io_mouse_shutdown (void ) {
276
274
memset (& mouse_manager , 0 , sizeof (mouse_manager ));
277
- printf ("[mouse] Shutdown: bindings released\n" );
278
275
}
279
276
280
277
// TOUCH
@@ -300,7 +297,7 @@ static void fossil_io_touch_get_event(fossil_io_touch_event_t* event) {
300
297
301
298
void fossil_io_touch_register_binding (fossil_io_touch_event_t event , fossil_io_touch_callback_t callback ) {
302
299
if (touch_manager .count >= MAX_TOUCHBINDS ) {
303
- fprintf ( stderr , "[touch] Max bindings reached\n" );
300
+ fossil_io_fprintf ( FOSSIL_STDERR , "[touch] Max bindings reached\n" );
304
301
return ;
305
302
}
306
303
@@ -316,7 +313,7 @@ void fossil_io_touch_unregister_binding(fossil_io_touch_event_t event) {
316
313
return ;
317
314
}
318
315
}
319
- fprintf ( stderr , "[touch] Binding not found\n" );
316
+ fossil_io_fprintf ( FOSSIL_STDERR , "[touch] Binding not found\n" );
320
317
}
321
318
322
319
void fossil_io_touch_poll_events (void ) {
@@ -341,10 +338,8 @@ void fossil_io_touch_clear_bindings(void) {
341
338
342
339
void fossil_io_touch_init (void ) {
343
340
memset (& touch_manager , 0 , sizeof (touch_manager ));
344
- printf ("[touch] Initialized: bindings cleared\n" );
345
341
}
346
342
347
343
void fossil_io_touch_shutdown (void ) {
348
344
memset (& touch_manager , 0 , sizeof (touch_manager ));
349
- printf ("[touch] Shutdown: bindings released\n" );
350
345
}
0 commit comments