summaryrefslogtreecommitdiff
path: root/Source/Kernel/Devices/Display
diff options
context:
space:
mode:
authorAlexis211 <alexis211@gmail.com>2009-08-29 19:03:00 +0200
committerAlexis211 <alexis211@gmail.com>2009-08-29 19:03:00 +0200
commit9ad8e2fe0242da26dae7fca2b180640637c8c062 (patch)
tree92fdd3f2195221a110d2c4f1f2e98bd6505578ed /Source/Kernel/Devices/Display
parent0139012d683036fb661fed62babb71f59ec9ab45 (diff)
downloadMelon-9ad8e2fe0242da26dae7fca2b180640637c8c062.tar.gz
Melon-9ad8e2fe0242da26dae7fca2b180640637c8c062.zip
We now have (partial) support for UTF-8.
Diffstat (limited to 'Source/Kernel/Devices/Display')
-rw-r--r--Source/Kernel/Devices/Display/Display.proto.h3
-rw-r--r--Source/Kernel/Devices/Display/VGATextOutput.class.cpp4
-rw-r--r--Source/Kernel/Devices/Display/VGATextOutput.class.h2
3 files changed, 5 insertions, 4 deletions
diff --git a/Source/Kernel/Devices/Display/Display.proto.h b/Source/Kernel/Devices/Display/Display.proto.h
index 1c8e724..f2a98af 100644
--- a/Source/Kernel/Devices/Display/Display.proto.h
+++ b/Source/Kernel/Devices/Display/Display.proto.h
@@ -3,12 +3,13 @@
#include <Core/common.wtf.h>
#include <Devices/Device.proto.h>
+#include <Library/wchar.class.h>
class Display : public Device {
public:
virtual u16int textCols() = 0;
virtual u16int textRows() = 0;
- virtual void putChar(u16int line, u16int col, char c, u8int color) = 0; //Color : <bg 4byte><fg 4byte>
+ virtual void putChar(u16int line, u16int col, wchar c, u8int color) = 0; //Color : <bg 4byte><fg 4byte>
virtual void moveCursor(u16int line, u16int col) = 0;
virtual void clear() = 0;
};
diff --git a/Source/Kernel/Devices/Display/VGATextOutput.class.cpp b/Source/Kernel/Devices/Display/VGATextOutput.class.cpp
index a424153..2a69754 100644
--- a/Source/Kernel/Devices/Display/VGATextOutput.class.cpp
+++ b/Source/Kernel/Devices/Display/VGATextOutput.class.cpp
@@ -21,9 +21,9 @@ u16int VGATextOutput::textRows() {
return 25;
}
-void VGATextOutput::putChar(u16int line, u16int col, char c, u8int color) {
+void VGATextOutput::putChar(u16int line, u16int col, wchar c, u8int color) {
u16int* where = (u16int*)RAM_ADDR;
- where[(80 * line) + col] = (color << 8) | c;
+ where[(80 * line) + col] = (color << 8) | c.toAscii();
}
void VGATextOutput::moveCursor(u16int line, u16int col) {
diff --git a/Source/Kernel/Devices/Display/VGATextOutput.class.h b/Source/Kernel/Devices/Display/VGATextOutput.class.h
index eb3fc99..7746a7b 100644
--- a/Source/Kernel/Devices/Display/VGATextOutput.class.h
+++ b/Source/Kernel/Devices/Display/VGATextOutput.class.h
@@ -10,7 +10,7 @@ class VGATextOutput : public Display {
u16int textCols();
u16int textRows();
- void putChar(u16int line, u16int col, char c, u8int color);
+ void putChar(u16int line, u16int col, wchar c, u8int color);
void moveCursor(u16int line, u16int col);
void clear();
};