diff options
author | Marvin Borner | 2020-08-26 01:12:36 +0200 |
---|---|---|
committer | Marvin Borner | 2020-08-26 01:12:36 +0200 |
commit | 1e1889b89a59ef090851d779941049f7f96c45bc (patch) | |
tree | 7bd8fd1069225f5a1d490fba88ec0fdc189638f0 /kernel/drivers/mouse.c | |
parent | 2b26af8325b9492948cb7fe516638537e4e58337 (diff) |
Some cursor things
Diffstat (limited to 'kernel/drivers/mouse.c')
-rw-r--r-- | kernel/drivers/mouse.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/drivers/mouse.c b/kernel/drivers/mouse.c index 64204c3..a5f5d0c 100644 --- a/kernel/drivers/mouse.c +++ b/kernel/drivers/mouse.c @@ -1,5 +1,6 @@ // MIT License, Copyright (c) 2020 Marvin Borner +#include <boot.h> #include <cpu.h> #include <event.h> #include <interrupts.h> @@ -29,6 +30,8 @@ void mouse_handler() case 2: mouse_byte[2] = inb(0x60); + free(event); + event = malloc(sizeof(*event)); event->magic = MOUSE_MAGIC; event->diff_x = mouse_byte[1]; event->diff_y = mouse_byte[2]; @@ -76,8 +79,6 @@ char mouse_read() void mouse_install() { - event = malloc(sizeof(*event)); - u8 status; // Enable auxiliary mouse device |