Moved the message-box 'OK' text into language.c. Display the Result from envGetLastLoadResult() with a message-box when required.
This commit is contained in:
parent
27d195e118
commit
9aaac6f01e
@ -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] =
|
[StrId_AppInfo_Author] =
|
||||||
{
|
{
|
||||||
STR_EN("Author"),
|
STR_EN("Author"),
|
||||||
@ -281,6 +286,11 @@ const char* const g_strings[StrId_Max][16] =
|
|||||||
STR_DE("Zurück"),
|
STR_DE("Zurück"),
|
||||||
},
|
},
|
||||||
|
|
||||||
|
[StrId_MsgBox_OK] =
|
||||||
|
{
|
||||||
|
STR_EN("OK"),
|
||||||
|
},
|
||||||
|
|
||||||
/*[StrId_Reboot] =
|
/*[StrId_Reboot] =
|
||||||
{
|
{
|
||||||
STR_EN(
|
STR_EN(
|
||||||
|
@ -14,12 +14,16 @@ typedef enum
|
|||||||
StrId_NoAppsFound_Title,
|
StrId_NoAppsFound_Title,
|
||||||
StrId_NoAppsFound_Msg,
|
StrId_NoAppsFound_Msg,
|
||||||
|
|
||||||
|
StrId_LastLoadResult,
|
||||||
|
|
||||||
StrId_AppInfo_Author,
|
StrId_AppInfo_Author,
|
||||||
StrId_AppInfo_Version,
|
StrId_AppInfo_Version,
|
||||||
StrId_Actions_Launch,
|
StrId_Actions_Launch,
|
||||||
StrId_Actions_Open,
|
StrId_Actions_Open,
|
||||||
StrId_Actions_Back,
|
StrId_Actions_Back,
|
||||||
|
|
||||||
|
StrId_MsgBox_OK,
|
||||||
|
|
||||||
StrId_Reboot,
|
StrId_Reboot,
|
||||||
StrId_ReturnToHome,
|
StrId_ReturnToHome,
|
||||||
|
|
||||||
|
@ -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(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;
|
shadow_start_y = start_y + currMsgBox.height;
|
||||||
|
|
||||||
|
@ -14,6 +14,9 @@ u64 g_tickdiff_frame=0;
|
|||||||
|
|
||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
|
Result lastret=0;
|
||||||
|
char msg[256];
|
||||||
|
|
||||||
#ifdef PERF_LOG
|
#ifdef PERF_LOG
|
||||||
u64 start_tick=0;
|
u64 start_tick=0;
|
||||||
#endif
|
#endif
|
||||||
@ -31,6 +34,15 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
launchInit();
|
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
|
#ifdef PERF_LOG
|
||||||
gfxWaitForVsync();
|
gfxWaitForVsync();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user