Skip to content

Commit

Permalink
Try to fix the backspace on Linux.
Browse files Browse the repository at this point in the history
  • Loading branch information
TediusTimmy committed May 2, 2023
1 parent 9c334fd commit df8c91b
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion machina.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,16 @@ void platformColors (byte pair)

byte platformGetch (void)
{
return getch();
// I just noticed that I never call refresh in the main UpdateScreen loop.
// It gets called implicitly here, because the window has been modified. The more you know.
// I don't particularly like this, but I don't want to add another phony function to waste
// RAM on the CX16.
int ch = getch();
if (KEY_BACKSPACE == ch)
{
ch = '\b';
}
return ch;
}

void platformPutch (byte ch)
Expand Down

0 comments on commit df8c91b

Please sign in to comment.