summaryrefslogtreecommitdiffhomepage
path: root/dev/kernel/HALKit/AMD64/HalDebugOutput.cc
diff options
context:
space:
mode:
authorAmlal <amlal@nekernel.org>2025-05-08 08:54:48 +0200
committerAmlal <amlal@nekernel.org>2025-05-08 08:54:48 +0200
commit8c0d7efb90585bf53b9f7496c2883af5ffa6ee68 (patch)
treeb4d5dbea3d8f273b0bbd6ef2d4b53d487890e95b /dev/kernel/HALKit/AMD64/HalDebugOutput.cc
parenta8782019a20f5487494e436f79b876b57f7229e1 (diff)
feat(kernel): Fix warnings and bugs regarding the DebugOutput device.
Diffstat (limited to 'dev/kernel/HALKit/AMD64/HalDebugOutput.cc')
-rw-r--r--dev/kernel/HALKit/AMD64/HalDebugOutput.cc24
1 files changed, 3 insertions, 21 deletions
diff --git a/dev/kernel/HALKit/AMD64/HalDebugOutput.cc b/dev/kernel/HALKit/AMD64/HalDebugOutput.cc
index a9759fc0..71dee911 100644
--- a/dev/kernel/HALKit/AMD64/HalDebugOutput.cc
+++ b/dev/kernel/HALKit/AMD64/HalDebugOutput.cc
@@ -76,28 +76,11 @@ EXTERN_C void ke_utf_io_write(IDeviceObject<const Utf8Char*>* obj, const Utf8Cha
index = 0;
len = urt_string_len(bytes);
- static BOOL not_important = YES;
-
while (index < len) {
if (bytes[index] == '\r') HAL::rt_out8(Detail::kPort, '\r');
HAL::rt_out8(Detail::kPort, bytes[index] == '\r' ? '\n' : bytes[index]);
- char tmp_str[2];
- tmp_str[0] = bytes[index];
- tmp_str[1] = 0;
-
- if (bytes[index] == '*') {
- if (not_important)
- not_important = NO;
- else
- not_important = YES;
-
- ++index;
-
- continue;
- }
-
++index;
}
@@ -124,9 +107,8 @@ EXTERN_C void ke_io_write(IDeviceObject<const Char*>* obj, const Char* bytes) {
index = 0;
len = rt_string_len(bytes);
- static SizeT x = kFontSizeX, y = kFontSizeY;
-
- static BOOL not_important = YES;
+ STATIC SizeT x = kFontSizeX, y = kFontSizeY;
+ STATIC BOOL not_important = YES;
while (index < len) {
if (bytes[index] == '\r') HAL::rt_out8(Detail::kPort, '\r');
@@ -148,7 +130,7 @@ EXTERN_C void ke_io_write(IDeviceObject<const Char*>* obj, const Char* bytes) {
continue;
}
- fb_render_string(tmp_str, y, x, not_important ? RGB(0xff, 0xff, 0xff) : RGB(0x00, 0x00, 0xff));
+ fb_render_string(tmp_str, y, x, not_important ? RGB(0xff, 0xff, 0xff) : RGB(0xff, 0x00, 0x00));
if (bytes[index] == '\r') {
y += kFontSizeY;