From b033314bf1901d436dc71d41d5e1f37dda47e511 Mon Sep 17 00:00:00 2001 From: Anton Kling Date: Thu, 12 Dec 2024 16:03:08 +0100 Subject: formatting: Use clang-format on all projects This commit also add braces to all `if` statements. --- kernel/drivers/mouse.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'kernel/drivers/mouse.c') 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); -- cgit v1.2.3