X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=hw_keyboard.c;h=aaf2f2c88f5a24cd5139517343bd15348d165205;hb=8ff3b508f7306154413888901dc3af4fe3ef0cbf;hp=592b6735736a23135220f5ceb4952e3fb39b8fed;hpb=94be117719b907e351bb2bf1096f6195daecd2aa;p=dcpu16 diff --git a/hw_keyboard.c b/hw_keyboard.c index 592b673..aaf2f2c 100644 --- a/hw_keyboard.c +++ b/hw_keyboard.c @@ -91,11 +91,6 @@ void keyboard_rfbevent_(rfbBool down, rfbKeySym key, rfbClientPtr cl) { dcpu16_interrupt(hw->vm, keyboard->interrupt_message); } } - -void keyboard_vnc_associate(struct dcpu16_hw *hw, rfbScreenInfoPtr rfbScreen) { - rfbScreen->screenData = hw; - rfbScreen->kbdAddEvent = keyboard_rfbevent_; -} #endif /* HAVE_LIBVNCSERVER */ static @@ -237,9 +232,10 @@ int keyboard_data_ctl_(struct dcpu16_hw *hw, const char *cmd, void *data_in, voi return -EINVAL; } -static struct dcpu16_hw hw_ = { - .vm = NULL, + +struct dcpu16_hw_module dcpu16_hw_module_keyboard = { .name_ = "Generic Keyboard (compatible)", + .id_l = 0x7406, .id_h = 0x30cf, .ver = 0x0001, @@ -248,11 +244,7 @@ static struct dcpu16_hw hw_ = { .hwi = keyboard_hwi_, .cycle = keyboard_cycle_, .reset = keyboard_reset_, - .data = (struct keyboard_ *)NULL -}; -struct dcpu16_hw_module dcpu16_hw_module_keyboard = { - .template = &hw_, .data_init = keyboard_data_init_, .data_free = keyboard_data_free_, .ctl = keyboard_data_ctl_,