diff --git a/common/language.c b/common/language.c index 2204969..d602de7 100644 --- a/common/language.c +++ b/common/language.c @@ -211,6 +211,11 @@ const char* const g_strings[StrId_Max][16] = ), }, + [StrId_LastLoadResult] = + { + STR_EN("The last application returned an error:"), + }, + [StrId_AppInfo_Author] = { STR_EN("Author"), @@ -281,6 +286,11 @@ const char* const g_strings[StrId_Max][16] = STR_DE("Zurück"), }, + [StrId_MsgBox_OK] = + { + STR_EN("OK"), + }, + /*[StrId_Reboot] = { STR_EN( diff --git a/common/language.h b/common/language.h index 56bc31a..fe0b0c5 100644 --- a/common/language.h +++ b/common/language.h @@ -14,12 +14,16 @@ typedef enum StrId_NoAppsFound_Title, StrId_NoAppsFound_Msg, + StrId_LastLoadResult, + StrId_AppInfo_Author, StrId_AppInfo_Version, StrId_Actions_Launch, StrId_Actions_Open, StrId_Actions_Back, + StrId_MsgBox_OK, + StrId_Reboot, StrId_ReturnToHome, diff --git a/common/message-box.c b/common/message-box.c index 5134a45..1950eaf 100644 --- a/common/message-box.c +++ b/common/message-box.c @@ -127,7 +127,7 @@ void menuDrawMsgBox() { DrawText(interuiregular18, start_x + (currMsgBox.width - text_width) / 2, start_y + (currMsgBox.height - text_height - 80) / 2, MakeColor(0, 0, 0, 255), currMsgBox.text); } - DrawText(interuimedium20, start_x + 365, start_y + 245, MakeColor(0, 0, 0, 255), "OK"); + DrawText(interuimedium20, start_x + 365, start_y + 245, MakeColor(0, 0, 0, 255), textGetString(StrId_MsgBox_OK)); shadow_start_y = start_y + currMsgBox.height; @@ -168,4 +168,4 @@ void menuCloseMsgBox() { currMsgBox.width = currMsgBox.height = 0; currMsgBox.text = NULL; -} \ No newline at end of file +} diff --git a/nx_main/main.c b/nx_main/main.c index f8be1f8..8201931 100644 --- a/nx_main/main.c +++ b/nx_main/main.c @@ -14,6 +14,9 @@ u64 g_tickdiff_frame=0; int main(int argc, char **argv) { + Result lastret=0; + char msg[256]; + #ifdef PERF_LOG u64 start_tick=0; #endif @@ -31,6 +34,15 @@ int main(int argc, char **argv) launchInit(); + lastret = envGetLastLoadResult(); + + if (R_FAILED(lastret)) { + memset(msg, 0, sizeof(msg)); + snprintf(msg, sizeof(msg)-1, "%s\n0x%x", textGetString(StrId_LastLoadResult), lastret); + + menuCreateMsgBox(780, 300, msg); + } + #ifdef PERF_LOG gfxWaitForVsync();