mirror of
https://github.com/sanni/cartreader.git
synced 2025-01-11 20:49:06 +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();
|
display_Clear();
|
||||||
|
|
||||||
// Read game name
|
// Read game name
|
||||||
|
#if defined(enable_OLED)
|
||||||
get_line(gamename, &myFile, 42);
|
get_line(gamename, &myFile, 42);
|
||||||
|
#else
|
||||||
|
get_line(gamename, &myFile, 96);
|
||||||
|
#endif
|
||||||
|
|
||||||
// Read CRC32 checksum
|
// Read CRC32 checksum
|
||||||
sprintf(checksumStr, "%c", myFile.read());
|
sprintf(checksumStr, "%c", myFile.read());
|
||||||
|
@ -1966,14 +1966,14 @@ void println_Msg(const char myString[]) {
|
|||||||
if ((display.tx + strlen(myString) * 6) > 128) {
|
if ((display.tx + strlen(myString) * 6) > 128) {
|
||||||
int strPos = 0;
|
int strPos = 0;
|
||||||
// Print until end of display
|
// Print until end of display
|
||||||
while (display.tx < 122) {
|
while ((display.tx < 122) && (myString[strPos] != '\0')) {
|
||||||
display.print(myString[strPos]);
|
display.print(myString[strPos]);
|
||||||
strPos++;
|
strPos++;
|
||||||
}
|
}
|
||||||
// Newline
|
// Newline
|
||||||
display.setCursor(0, display.ty + 8);
|
display.setCursor(0, display.ty + 8);
|
||||||
// Print until end of display and ignore remaining characters
|
// 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]);
|
display.print(myString[strPos]);
|
||||||
strPos++;
|
strPos++;
|
||||||
}
|
}
|
||||||
|
@ -772,7 +772,11 @@ void setCart_INTV() {
|
|||||||
display_Clear();
|
display_Clear();
|
||||||
|
|
||||||
// Read game name
|
// Read game name
|
||||||
|
#if defined(enable_OLED)
|
||||||
get_line(gamename, &myFile, 42);
|
get_line(gamename, &myFile, 42);
|
||||||
|
#else
|
||||||
|
get_line(gamename, &myFile, 96);
|
||||||
|
#endif
|
||||||
|
|
||||||
// Read CRC32 checksum
|
// Read CRC32 checksum
|
||||||
sprintf(checksumStr, "%c", myFile.read());
|
sprintf(checksumStr, "%c", myFile.read());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user