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,26 +133,22 @@ void main(void)
//Boot options aren't being forced //Boot options aren't being forced
if(needConfig != DONT_CONFIGURE) if(needConfig != DONT_CONFIGURE)
{ {
bool pinExists = CONFIG(7) && readPin(&pin);
//If we get here we should check the PIN (if it exists) in all cases
if(pinExists) verifyPin(&pin, true);
//If no configuration file exists or SELECT is held, load configuration menu //If no configuration file exists or SELECT is held, load configuration menu
bool shouldLoadConfigurationMenu = needConfig == CREATE_CONFIGURATION || ((pressed & BUTTON_SELECT) && !(pressed & BUTTON_L1)), bool shouldLoadConfigurationMenu = needConfig == CREATE_CONFIGURATION || ((pressed & BUTTON_SELECT) && !(pressed & BUTTON_L1));
pinExists = CONFIG(7) && readPin(&pin);
if(pinExists || shouldLoadConfigurationMenu) if(shouldLoadConfigurationMenu)
{ {
initScreens(); configureCFW(configPath);
//If we get here we should check the PIN (if it exists) in all cases if(!pinExists && CONFIG(7)) pin = newPin();
if(pinExists) verifyPin(&pin, true);
if(shouldLoadConfigurationMenu) //Update pressed buttons
{ pressed = HID_PAD;
configureCFW(configPath);
if(!pinExists && CONFIG(7)) pin = newPin();
//Update pressed buttons
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);