Fixed bug with FB loading a disk image with an underscore in the name.

This commit is contained in:
Stephen White 2018-12-29 17:42:06 +11:00
parent 05dbbe1c67
commit 9de1789c4e
3 changed files with 4 additions and 6 deletions

View file

@ -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;
}

View file

@ -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)

View file

@ -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)