Move stuff from firm.c (2)

This commit is contained in:
Aurora 2016-08-15 13:23:27 +02:00
parent c9c373f607
commit 83a849126a
3 changed files with 14 additions and 17 deletions

View File

@ -29,7 +29,8 @@
void configureCFW(const char *configPath) void configureCFW(const char *configPath)
{ {
clearScreens(); initScreens();
drawString(CONFIG_TITLE, 10, 10, COLOR_TITLE); drawString(CONFIG_TITLE, 10, 10, COLOR_TITLE);
drawString("Press A to select, START to save", 10, 30, COLOR_WHITE); drawString("Press A to select, START to save", 10, 30, COLOR_WHITE);

View File

@ -133,17 +133,14 @@ void main(void)
//Boot options aren't being forced //Boot options aren't being forced
if(needConfig != DONT_CONFIGURE) if(needConfig != DONT_CONFIGURE)
{ {
//If no configuration file exists or SELECT is held, load configuration menu bool pinExists = CONFIG(7) && readPin(&pin);
bool shouldLoadConfigurationMenu = needConfig == CREATE_CONFIGURATION || ((pressed & BUTTON_SELECT) && !(pressed & BUTTON_L1)),
pinExists = CONFIG(7) && readPin(&pin);
if(pinExists || shouldLoadConfigurationMenu)
{
initScreens();
//If we get here we should check the PIN (if it exists) in all cases //If we get here we should check the PIN (if it exists) in all cases
if(pinExists) verifyPin(&pin, true); if(pinExists) verifyPin(&pin, true);
//If no configuration file exists or SELECT is held, load configuration menu
bool shouldLoadConfigurationMenu = needConfig == CREATE_CONFIGURATION || ((pressed & BUTTON_SELECT) && !(pressed & BUTTON_L1));
if(shouldLoadConfigurationMenu) if(shouldLoadConfigurationMenu)
{ {
configureCFW(configPath); configureCFW(configPath);
@ -153,7 +150,6 @@ void main(void)
//Update pressed buttons //Update pressed buttons
pressed = HID_PAD; pressed = HID_PAD;
} }
}
if(isA9lh && !CFG_BOOTENV && pressed == SAFE_MODE) if(isA9lh && !CFG_BOOTENV && pressed == SAFE_MODE)
{ {

View File

@ -113,7 +113,7 @@ PINData newPin(void)
void verifyPin(PINData *in, bool allowQuit) void verifyPin(PINData *in, bool allowQuit)
{ {
clearScreens(); initScreens();
drawString("Press START to shutdown or enter pin to proceed.", 10, 10, COLOR_WHITE); drawString("Press START to shutdown or enter pin to proceed.", 10, 10, COLOR_WHITE);
drawString("Pin: ", 10, 10 + 2 * SPACING_Y, COLOR_WHITE); drawString("Pin: ", 10, 10 + 2 * SPACING_Y, COLOR_WHITE);