Use pointers to avoid some string copying

Size: 60664 -> 60464
This commit is contained in:
Juan Antonio
2023-12-23 18:18:23 +01:00
committed by egzumer
parent 1281bbf033
commit f8ef687026
8 changed files with 138 additions and 182 deletions

View File

@@ -29,18 +29,18 @@
void UI_DisplayAircopy(void)
{
char String[16];
char String[16] = {0};
char *pPrintStr = { 0 };
memset(gFrameBuffer, 0, sizeof(gFrameBuffer));
if (gAircopyState == AIRCOPY_READY) {
pPrintStr = "AIR COPY(RDY)";
} else if (gAircopyState == AIRCOPY_TRANSFER) {
pPrintStr = "AIR COPY";
} else {
pPrintStr = "AIR COPY(CMP)";
}
if (gAircopyState == AIRCOPY_READY)
strcpy(String, "AIR COPY(RDY)");
else
if (gAircopyState == AIRCOPY_TRANSFER)
strcpy(String, "AIR COPY");
else
strcpy(String, "AIR COPY(CMP)");
UI_PrintString(String, 2, 127, 0, 8);
UI_PrintString(pPrintStr, 2, 127, 0, 8);
if (gInputBoxIndex == 0)
{