This commit is contained in:
2022-03-17 00:57:15 +03:00
parent 6e6305d2ec
commit cc4e1f48aa
18 changed files with 388 additions and 163 deletions

View File

@@ -142,7 +142,7 @@ void PIScreen::SystemConsole::resize(int w, int h) {
pcells.resize(height);
for (int i = 0; i < height; ++i) {
cells[i].resize(width);
pcells[i].resize(width, Cell(0));
pcells[i].resize(width, Cell(PIChar()));
}
#ifdef WINDOWS
PRIVATE->sbi.srWindow = PRIVATE->csbi.srWindow;

View File

@@ -691,7 +691,7 @@ bool TileInput::keyEvent(PIKbdListener::KeyEvent key) {
default:
PIChar tc
#ifdef WINDOWS
= PIChar(key.key);
= PIChar((ushort)key.key);
#else
= PIChar::fromUTF8((char *)&(key.key));
#endif

View File

@@ -239,9 +239,9 @@ void PITerminal::write(PIKbdListener::KeyEvent ke) {
else {
PIByteArray ba;
#ifdef WINDOWS
ba << uchar(PIChar(ke.key).toConsole1Byte());
ba << uchar(PIChar((ushort)ke.key).toConsole1Byte());
#else
ba = PIString(PIChar(ke.key)).toUTF8();
ba = PIString(PIChar((ushort)ke.key)).toUTF8();
#endif
write(ba);
}