From d7673db5960f95327c8b8831b3befb9a1fe90e15 Mon Sep 17 00:00:00 2001 From: maron2000 <68574602+maron2000@users.noreply.github.com> Date: Wed, 26 Mar 2025 21:05:24 +0900 Subject: [PATCH] Consider autodbcs option in device_CON::Write --- src/dos/dev_con.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/dos/dev_con.h b/src/dos/dev_con.h index 944dc89d3..c5b42f5b1 100644 --- a/src/dos/dev_con.h +++ b/src/dos/dev_con.h @@ -1053,6 +1053,7 @@ void DOS_BreakAction(); bool read_kanji1 = false; uint8_t temp_char = 0; void WriteChar(uint16_t col, uint16_t row, uint8_t page, uint16_t chr, uint8_t attr, bool useattr); +extern bool dbcs_sbcs; bool device_CON::Write(const uint8_t * data,uint16_t * size) { uint16_t count=0; @@ -1117,7 +1118,11 @@ bool device_CON::Write(const uint8_t * data,uint16_t * size) { col = CURSOR_POS_COL(page); BIOS_NCOLS; - if(isDBCSCP() && !dos.direct_output) { // Consideration of first byte of DBCS characters at the end of line + if(isDBCSCP() && !dos.direct_output +#if defined(USE_TTF) + && dbcs_sbcs +#endif + ) { // Consideration of first byte of DBCS characters at the end of line if(!read_kanji1 && isKanji1(data[count])) { read_kanji1 = true; temp_char = data[count];