mirror of
https://github.com/Fennix-Project/Kernel.git
synced 2025-05-30 00:08:03 +00:00
Fix for display uart printing colors
This commit is contained in:
parent
b8c5c15a47
commit
31f83fe0f7
@ -14,8 +14,6 @@ namespace Video
|
|||||||
char Display::Print(char Char, int Index, bool WriteToUART)
|
char Display::Print(char Char, int Index, bool WriteToUART)
|
||||||
{
|
{
|
||||||
SMARTLOCK(PrintLock);
|
SMARTLOCK(PrintLock);
|
||||||
if (WriteToUART)
|
|
||||||
UniversalAsynchronousReceiverTransmitter::UART(UniversalAsynchronousReceiverTransmitter::COM1).Write((char)Char);
|
|
||||||
|
|
||||||
if (this->ColorIteration)
|
if (this->ColorIteration)
|
||||||
{
|
{
|
||||||
@ -29,19 +27,25 @@ namespace Video
|
|||||||
else
|
else
|
||||||
this->Buffers[Index]->Color = 0;
|
this->Buffers[Index]->Color = 0;
|
||||||
|
|
||||||
|
UniversalAsynchronousReceiverTransmitter::UART(UniversalAsynchronousReceiverTransmitter::COM1).Write(Char);
|
||||||
this->ColorPickerIteration++;
|
this->ColorPickerIteration++;
|
||||||
if (this->ColorPickerIteration == 6)
|
if (this->ColorPickerIteration == 6)
|
||||||
{
|
{
|
||||||
this->ColorPickerIteration = 0;
|
this->ColorPickerIteration = 0;
|
||||||
|
UniversalAsynchronousReceiverTransmitter::UART(UniversalAsynchronousReceiverTransmitter::COM1).Write(']');
|
||||||
this->ColorIteration = false;
|
this->ColorIteration = false;
|
||||||
}
|
}
|
||||||
return Char;
|
return Char;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (WriteToUART)
|
||||||
|
UniversalAsynchronousReceiverTransmitter::UART(UniversalAsynchronousReceiverTransmitter::COM1).Write(Char);
|
||||||
|
|
||||||
switch (Char)
|
switch (Char)
|
||||||
{
|
{
|
||||||
case '\e':
|
case '\e':
|
||||||
{
|
{
|
||||||
|
UniversalAsynchronousReceiverTransmitter::UART(UniversalAsynchronousReceiverTransmitter::COM1).Write('[');
|
||||||
this->ColorIteration = true;
|
this->ColorIteration = true;
|
||||||
return Char;
|
return Char;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user