If only one payload exists, START directly boots it

This commit is contained in:
Aurora Wright 2017-05-10 15:16:32 +02:00
parent 18b8eaabae
commit 5fe83588eb

View File

@ -205,6 +205,11 @@ void payloadMenu(void)
if(!payloadNum) return; if(!payloadNum) return;
u32 pressed = 0,
selectedPayload = 0;
if(payloadNum != 1)
{
initScreens(); initScreens();
drawString(true, 10, 10, COLOR_TITLE, "Luma3DS chainloader"); drawString(true, 10, 10, COLOR_TITLE, "Luma3DS chainloader");
@ -216,9 +221,6 @@ void payloadMenu(void)
if(color == COLOR_RED) color = COLOR_WHITE; if(color == COLOR_RED) color = COLOR_WHITE;
} }
u32 pressed = 0,
selectedPayload = 0;
while(pressed != BUTTON_A && pressed != BUTTON_START) while(pressed != BUTTON_A && pressed != BUTTON_START)
{ {
do do
@ -252,8 +254,9 @@ void payloadMenu(void)
drawString(true, 10, 10 + (3 + oldSelectedPayload) * SPACING_Y, COLOR_WHITE, payloadList[oldSelectedPayload]); drawString(true, 10, 10 + (3 + oldSelectedPayload) * SPACING_Y, COLOR_WHITE, payloadList[oldSelectedPayload]);
drawString(true, 10, 10 + (3 + selectedPayload) * SPACING_Y, COLOR_RED, payloadList[selectedPayload]); drawString(true, 10, 10 + (3 + selectedPayload) * SPACING_Y, COLOR_RED, payloadList[selectedPayload]);
} }
}
if(pressed == BUTTON_A) if(pressed != BUTTON_START)
{ {
sprintf(path, "payloads/%s.bin", payloadList[selectedPayload]); sprintf(path, "payloads/%s.bin", payloadList[selectedPayload]);
loadPayload(0, path); loadPayload(0, path);