From 9de1789c4e18fd8b8ca40d689b1dda31ea248345 Mon Sep 17 00:00:00 2001 From: Stephen White Date: Sat, 29 Dec 2018 17:42:06 +1100 Subject: [PATCH] Fixed bug with FB loading a disk image with an underscore in the name. --- src/Petscii.h | 1 + src/main.cpp | 7 ++----- src/options.cpp | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/Petscii.h b/src/Petscii.h index bbda95d..c259e2d 100644 --- a/src/Petscii.h +++ b/src/Petscii.h @@ -32,6 +32,7 @@ static inline u8 petscii2ascii(u8 ch) if (ch >(64 + 128) && ch < (91 + 128)) ch -= 128; else if (ch >(96 - 32) && ch < (123 - 32)) ch += 32; else if (ch >(192 - 128) && ch < (219 - 128)) ch += 128; + else if (ch == 164) ch = 95; // to handle underscore return ch; } diff --git a/src/main.cpp b/src/main.cpp index dda50f0..19094e0 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -120,7 +120,6 @@ SpinLock core0RefreshingScreen; unsigned int screenWidth = 1024; unsigned int screenHeight = 768; -int i2cLcdUseCBMChar = 0; const char* termainalTextRed = "\E[31m"; const char* termainalTextNormal = "\E[0m"; @@ -254,7 +253,7 @@ void InitialiseLCD() int i2cLcdOnContrast = options.I2CLcdOnContrast(); int i2cLcdDimContrast = options.I2CLcdDimContrast(); int i2cLcdDimTime = options.I2CLcdDimTime(); - i2cLcdUseCBMChar = options.I2cLcdUseCBMChar(); + int i2cLcdUseCBMChar = options.I2cLcdUseCBMChar(); LCD_MODEL i2cLcdModel = options.I2CLcdModel(); if (i2cLcdModel) @@ -1067,7 +1066,7 @@ void emulator() m_IEC_Commands.SetAutoBootFB128(options.AutoBootFB128()); m_IEC_Commands.Set128BootSectorName(options.Get128BootSectorName()); - m_IEC_Commands.SetLowercaseBrowseModeFilenames(options.LowercaseBrowseModeFilenames()); + m_IEC_Commands.SetLowercaseBrowseModeFilenames(options.LowercaseBrowseModeFilenames()); emulating = IEC_COMMANDS; @@ -1362,8 +1361,6 @@ void DisplayOptions(int y_pos) screen.PrintText(false, 0, y_pos += 16, tempBuffer, COLOUR_WHITE, COLOUR_BLACK); snprintf(tempBuffer, tempBufferSize, "AutoBaseName = %s\r\n", options.GetAutoBaseName()); screen.PrintText(false, 0, y_pos += 16, tempBuffer, COLOUR_WHITE, COLOUR_BLACK); - snprintf(tempBuffer, tempBufferSize, "I2cLcdUseCBMChar = %d\r\n", i2cLcdUseCBMChar); - screen.PrintText(false, 0, y_pos += 16, tempBuffer, COLOUR_WHITE, COLOUR_BLACK); } void DisplayI2CScan(int y_pos) diff --git a/src/options.cpp b/src/options.cpp index 2eaf7d3..ccb2f51 100644 --- a/src/options.cpp +++ b/src/options.cpp @@ -147,8 +147,8 @@ Options::Options(void) , i2cScan(0) , i2cLcdFlip(0) , i2cLcdOnContrast(127) - , i2cLcdModel(LCD_UNKNOWN) , i2cLcdUseCBMChar(0) + , i2cLcdModel(LCD_UNKNOWN) , scrollHighlightRate(0.125f) , keyboardBrowseLCDScreen(0) , buttonEnter(1)