Skip to content

Commit 5602089

Browse files
committed
[core] Temporarily disabled keyboard attach handling.
There is some kind of strange bug in KOS related to this, but I haven’t figured out what it is yet.
1 parent 7f73229 commit 5602089

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

src/main.c

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -393,11 +393,11 @@ void ShutdownDS() {
393393
expt_shutdown();
394394
g1_ata_shutdown();
395395
}
396-
396+
/*
397397
#define KBD_ATTACHED (1 << 0)
398398
#define KBD_DETACHED (1 << 1)
399399
400-
static uint8_t kbd_changed = 0;
400+
static volatile uint8_t kbd_changed = 0;
401401
402402
static void close_vkb_module(void) {
403403
if(maple_enum_type(0, MAPLE_FUNC_KEYBOARD)) {
@@ -426,24 +426,24 @@ static void keyboard_detach_cb(maple_device_t *dev) {
426426
(void) dev;
427427
kbd_changed |= KBD_DETACHED;
428428
}
429-
429+
*/
430430
int main(int argc, char **argv) {
431431

432-
static SDL_Event event;
432+
SDL_Event event;
433433

434434
if(InitDS()) {
435435
return -1;
436436
}
437-
438-
maple_attach_callback(MAPLE_FUNC_KEYBOARD, keyboard_attach_cb);
439-
maple_detach_callback(MAPLE_FUNC_KEYBOARD, keyboard_detach_cb);
440-
437+
438+
// maple_attach_callback(MAPLE_FUNC_KEYBOARD, keyboard_attach_cb);
439+
// maple_detach_callback(MAPLE_FUNC_KEYBOARD, keyboard_detach_cb);
440+
441441
while(1) {
442442

443443
while(SDL_PollEvent(&event)) {
444444
ProcessInputEvents(&event);
445445
}
446-
446+
/*
447447
if (kbd_changed) {
448448
if (kbd_changed & KBD_ATTACHED) {
449449
close_vkb_module();
@@ -453,7 +453,7 @@ int main(int argc, char **argv) {
453453
}
454454
kbd_changed = 0;
455455
}
456-
456+
*/
457457
UnLoadOldApps();
458458
GUI_ClearTrash();
459459

@@ -465,4 +465,3 @@ int main(int argc, char **argv) {
465465
ShutdownDS();
466466
return 0;
467467
}
468-

0 commit comments

Comments
 (0)