summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--textscreen/txt_desktop.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/textscreen/txt_desktop.c b/textscreen/txt_desktop.c
index 4b90ed66..99a5062d 100644
--- a/textscreen/txt_desktop.c
+++ b/textscreen/txt_desktop.c
@@ -158,10 +158,13 @@ void TXT_ExitMainLoop(void)
void TXT_DrawASCIITable(void)
{
+ unsigned char *screendata;
char buf[10];
int x, y;
int n;
+ screendata = TXT_GetScreenData();
+
TXT_FGColor(TXT_COLOR_BRIGHT_WHITE);
TXT_BGColor(TXT_COLOR_BLACK, 0);
@@ -172,11 +175,15 @@ void TXT_DrawASCIITable(void)
n = y * 16 + x;
TXT_GotoXY(x * 5, y);
- sprintf(buf, "%02x %c ", n, n);
+ sprintf(buf, "%02x ", n);
TXT_Puts(buf);
+
+ // Write the character directly to the screen memory buffer:
+
+ screendata[(y * TXT_SCREEN_W + x * 5 + 3) * 2] = n;
}
}
-
+
TXT_UpdateScreen();
}