mirror of
https://github.com/sanni/cartreader.git
synced 2024-12-24 12:01:53 +01:00
Fix word wrap bug on HW5
This commit is contained in:
parent
0a2e1ab36d
commit
92f76b324c
@ -386,7 +386,11 @@ void setCart_COL() {
|
||||
display_Clear();
|
||||
|
||||
// Read game name
|
||||
#if defined(enable_OLED)
|
||||
get_line(gamename, &myFile, 42);
|
||||
#else
|
||||
get_line(gamename, &myFile, 96);
|
||||
#endif
|
||||
|
||||
// Read CRC32 checksum
|
||||
sprintf(checksumStr, "%c", myFile.read());
|
||||
|
@ -1966,14 +1966,14 @@ void println_Msg(const char myString[]) {
|
||||
if ((display.tx + strlen(myString) * 6) > 128) {
|
||||
int strPos = 0;
|
||||
// Print until end of display
|
||||
while (display.tx < 122) {
|
||||
while ((display.tx < 122) && (myString[strPos] != '\0')) {
|
||||
display.print(myString[strPos]);
|
||||
strPos++;
|
||||
}
|
||||
// Newline
|
||||
display.setCursor(0, display.ty + 8);
|
||||
// Print until end of display and ignore remaining characters
|
||||
while ((strPos < strlen(myString)) && (display.tx < 122)) {
|
||||
while ((strPos < strlen(myString)) && (display.tx < 122) && (myString[strPos] != '\0')) {
|
||||
display.print(myString[strPos]);
|
||||
strPos++;
|
||||
}
|
||||
|
@ -772,7 +772,11 @@ void setCart_INTV() {
|
||||
display_Clear();
|
||||
|
||||
// Read game name
|
||||
#if defined(enable_OLED)
|
||||
get_line(gamename, &myFile, 42);
|
||||
#else
|
||||
get_line(gamename, &myFile, 96);
|
||||
#endif
|
||||
|
||||
// Read CRC32 checksum
|
||||
sprintf(checksumStr, "%c", myFile.read());
|
||||
|
Loading…
Reference in New Issue
Block a user