Merge branch 'master' into cleanup
This commit is contained in:
commit
2f5914ec54
5 changed files with 25 additions and 2 deletions
|
@ -292,7 +292,11 @@ void DiskCaddy::ShowSelectedImage(u32 index)
|
|||
x = 0;
|
||||
y = 0;
|
||||
|
||||
snprintf(buffer, 256, " D %d/%d ", index + 1, numberOfImages);
|
||||
snprintf(buffer, 256, " D %d/%d %c "
|
||||
, index + 1
|
||||
, numberOfImages
|
||||
, GetImage(index)->GetReadOnly() ? 'R' : ' '
|
||||
);
|
||||
screenLCD->PrintText(false, x, y, buffer, RGBA(0xff, 0xff, 0xff, 0xff), RGBA(0xff, 0xff, 0xff, 0xff));
|
||||
y += LCDFONTHEIGHT;
|
||||
|
||||
|
|
|
@ -1153,7 +1153,11 @@ void FileBrowser::ShowDeviceAndROM()
|
|||
u32 x = 0; // 43 * 8
|
||||
u32 y = screenMain->ScaleY(STATUS_BAR_POSITION_Y) - 20;
|
||||
|
||||
snprintf(buffer, 256, "Device %2d %s\r\n", *deviceID, roms->ROMNames[roms->currentROMIndex]);
|
||||
snprintf(buffer, 256, "Device %2d %*s\r\n"
|
||||
, *deviceID
|
||||
, roms->GetLongestRomNameLen()
|
||||
, roms->ROMNames[roms->currentROMIndex]
|
||||
);
|
||||
screenMain->PrintText(false, x, y, buffer, textColour, bgColour);
|
||||
}
|
||||
|
||||
|
|
|
@ -43,3 +43,10 @@ void ROMs::SelectROM(const char* ROMName)
|
|||
}
|
||||
}
|
||||
|
||||
unsigned ROMs::UpdateLongestRomNameLen( unsigned maybeLongest )
|
||||
{
|
||||
if (maybeLongest > longestRomNameLen)
|
||||
longestRomNameLen = maybeLongest;
|
||||
|
||||
return longestRomNameLen;
|
||||
}
|
||||
|
|
|
@ -42,5 +42,12 @@ public:
|
|||
|
||||
unsigned currentROMIndex;
|
||||
unsigned lastManualSelectedROMIndex;
|
||||
|
||||
unsigned GetLongestRomNameLen() { return longestRomNameLen; }
|
||||
unsigned UpdateLongestRomNameLen( unsigned maybeLongest );
|
||||
|
||||
protected:
|
||||
unsigned longestRomNameLen;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1238,6 +1238,7 @@ static void CheckOptions()
|
|||
{
|
||||
strncpy(roms.ROMNames[ROMIndex], ROMName, 255);
|
||||
roms.ROMValid[ROMIndex] = true;
|
||||
roms.UpdateLongestRomNameLen( strlen(roms.ROMNames[ROMIndex]) );
|
||||
}
|
||||
f_close(&fp);
|
||||
//DEBUG_LOG("Read ROM %s from options\r\n", ROMName);
|
||||
|
|
Loading…
Reference in a new issue