refactor console code for better ansi escape-code handling (#682)

This commit is contained in:
Dave Murphy 2025-07-26 14:32:00 +01:00 committed by GitHub
parent a4cd3bd86b
commit b186ec08bc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 445 additions and 414 deletions

View File

@ -121,6 +121,8 @@ struct PrintConsole
#define CONSOLE_CROSSED_OUT (1<<8) ///< Crossed out text
#define CONSOLE_FG_CUSTOM (1<<9) ///< Foreground custom color
#define CONSOLE_BG_CUSTOM (1<<10) ///< Background custom color
#define CONSOLE_COLOR_FG_BRIGHT (1<<11) ///< Bright foreground color
#define CONSOLE_COLOR_BG_BRIGHT (1<<12) ///< Bright background color
/// Console debug devices supported by libnx.
typedef enum {

File diff suppressed because it is too large Load Diff

View File

@ -172,8 +172,8 @@ static void ConsoleSwRenderer_scrollWindow(PrintConsole* con)
int i,j;
u32 x, y;
x = con->windowX * 16;
y = con->windowY * 16;
x = (con->windowX - 1) * 16;
y = (con->windowY - 1) * 16;
for (i=0; i<con->windowWidth*16; i+=sizeof(u128)/sizeof(u16)) {
u128 *from;