1
0
Fork 0
mirror of https://github.com/DarkMatterCore/nxdumptool.git synced 2024-11-26 12:12:02 +00:00

Some minor (trivial) changes.

Nothing too substantial. Just committing them before going to Spain.
This commit is contained in:
Pablo Curiel 2018-07-25 21:57:44 -04:00
parent 7a94da0a5c
commit 59e48748ae
3 changed files with 16 additions and 9 deletions

View file

@ -15,7 +15,4 @@ Result fsDeviceOperatorIsGameCardInserted(FsDeviceOperator* d, bool* out);
Result fsDeviceOperatorGetGameCardHandle(FsDeviceOperator* d, u32* out);
Result fsDeviceOperatorUpdatePartitionInfo(FsDeviceOperator* d, u32 handle, u32* out_title_version, u64* out_title_id);
// FsStorage
Result fsStorageGetSize(FsStorage* s, u64* out);
#endif

View file

@ -78,9 +78,10 @@ int main(int argc, char **argv)
if (getGameCardTitleIDAndVersion(&gameCardTitleID, &gameCardVersion))
{
convertTitleVersionToDecimal(gameCardVersion, gameCardVersionStr, sizeof(gameCardVersionStr));
getGameCardControlNacp(gameCardTitleID, gameCardName, sizeof(gameCardName), gameCardAuthor, sizeof(gameCardAuthor));
strtrim(gameCardName);
getGameCardControlNacp(gameCardTitleID, gameCardName, sizeof(gameCardName), gameCardAuthor, sizeof(gameCardAuthor));
strtrim(gameCardName);
if (strlen(gameCardName))
{
snprintf(fixedGameCardName, sizeof(fixedGameCardName) / sizeof(fixedGameCardName[0]), "%s", gameCardName);
@ -192,6 +193,7 @@ int main(int argc, char **argv)
} else {
snprintf(strbuf, sizeof(strbuf) / sizeof(strbuf[0]), "Failed to initialize the time service! (0x%08X)", result);
uiDrawString(strbuf, 0, 0, 255, 255, 255);
syncDisplay();
delay(5);
ret = -5;
}
@ -200,6 +202,7 @@ int main(int argc, char **argv)
} else {
snprintf(strbuf, sizeof(strbuf) / sizeof(strbuf[0]), "Failed to initialize the ns service! (0x%08X)", result);
uiDrawString(strbuf, 0, 0, 255, 255, 255);
syncDisplay();
delay(5);
ret = -4;
}
@ -208,6 +211,7 @@ int main(int argc, char **argv)
} else {
snprintf(strbuf, sizeof(strbuf) / sizeof(strbuf[0]), "Failed to initialize the ncm service! (0x%08X)", result);
uiDrawString(strbuf, 0, 0, 255, 255, 255);
syncDisplay();
delay(5);
ret = -3;
}
@ -216,6 +220,7 @@ int main(int argc, char **argv)
} else {
snprintf(strbuf, sizeof(strbuf) / sizeof(strbuf[0]), "Failed to open device operator! (0x%08X)", result);
uiDrawString(strbuf, 0, 0, 255, 255, 255);
syncDisplay();
delay(5);
ret = -2;
}
@ -224,6 +229,7 @@ int main(int argc, char **argv)
} else {
snprintf(strbuf, sizeof(strbuf) / sizeof(strbuf[0]), "Failed to initialize the fsp-srv service! (0x%08X)", result);
uiDrawString(strbuf, 0, 0, 255, 255, 255);
syncDisplay();
delay(5);
ret = -1;
}

View file

@ -237,6 +237,7 @@ void uiDrawString(const char* string, int x, int y, u8 r, u8 g, u8 b)
void uiStatusMsg(const char* format, ...)
{
statusMessageFadeout = 1000;
va_list args;
va_start(args, format);
vsnprintf(statusMessage, sizeof(statusMessage) / sizeof(statusMessage[0]), format, args);
@ -249,9 +250,12 @@ void uiUpdateStatusMsg()
{
if (!strlen(statusMessage) || !statusMessageFadeout) return;
int fadeout = (statusMessageFadeout > 255 ? 255 : statusMessageFadeout);
uiFill(0, currentFBHeight - 12, currentFBWidth, 8, 50, 50, 50);
int fadeout = (statusMessageFadeout > 255 ? 255 : statusMessageFadeout);
uiDrawString(statusMessage, 4, currentFBHeight - 12, fadeout, fadeout, fadeout);
syncDisplay();
statusMessageFadeout -= 4;
}