diff options
author | Anton Kling <anton@kling.gg> | 2024-12-12 16:03:08 +0100 |
---|---|---|
committer | Anton Kling <anton@kling.gg> | 2024-12-12 16:03:08 +0100 |
commit | b033314bf1901d436dc71d41d5e1f37dda47e511 (patch) | |
tree | 120bd137888a7f96904a47af7d20422608ffe225 /kernel/drivers/mouse.c | |
parent | dcbcdbdc5bcfb86eca05fb655e3bf009d89e39e0 (diff) |
formatting: Use clang-format on all projects
This commit also add braces to all `if` statements.
Diffstat (limited to 'kernel/drivers/mouse.c')
-rw-r--r-- | kernel/drivers/mouse.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/kernel/drivers/mouse.c b/kernel/drivers/mouse.c index 47133b8..dea8c08 100644 --- a/kernel/drivers/mouse.c +++ b/kernel/drivers/mouse.c @@ -102,18 +102,22 @@ void int_mouse(reg_t *r) { int16_t y = mouse_u8[2]; uint8_t xs = mouse_u8[0] & (1 << 4); uint8_t ys = mouse_u8[0] & (1 << 5); - if (xs) + if (xs) { x |= 0xFF00; - if (ys) + } + if (ys) { y |= 0xFF00; + } mouse_x += x; mouse_y -= y; - if (mouse_x < 0) + if (mouse_x < 0) { mouse_x = 0; - if (mouse_y < 0) + } + if (mouse_y < 0) { mouse_y = 0; + } mouse_middle_button = mouse_u8[0] & (1 << 2); mouse_right_button = mouse_u8[0] & (1 << 1); |