Add pin hiding option
This commit is contained in:
parent
6e5987e3ca
commit
92cc989dc9
@ -83,7 +83,8 @@ void configMenu(bool isSdMode, bool oldPinStatus, u32 oldPinMode)
|
||||
"( ) Enable game patching",
|
||||
"( ) Show NAND or user string in System Settings",
|
||||
"( ) Show GBA boot screen in patched AGB_FIRM",
|
||||
"( ) Patch SVC/service/archive/ARM9 access"
|
||||
"( ) Patch SVC/service/archive/ARM9 access",
|
||||
"( ) Hide Pin when entering"
|
||||
};
|
||||
|
||||
const char *optionsDescription[] = { "Select the default EmuNAND.\n\n"
|
||||
@ -190,6 +191,9 @@ void configMenu(bool isSdMode, bool oldPinStatus, u32 oldPinMode)
|
||||
"9.3 and 10.4.\n\n"
|
||||
"Only change this if you know what you\n"
|
||||
"are doing!",
|
||||
|
||||
"Hides the the input when entering pin\n"
|
||||
"to unlock the 3DS"
|
||||
};
|
||||
|
||||
struct multiOption {
|
||||
@ -218,6 +222,7 @@ void configMenu(bool isSdMode, bool oldPinStatus, u32 oldPinMode)
|
||||
{ .visible = true },
|
||||
{ .visible = true },
|
||||
{ .visible = true },
|
||||
{ .visible = true },
|
||||
{ .visible = true }
|
||||
};
|
||||
|
||||
|
@ -56,7 +56,8 @@ enum singleOptions
|
||||
PATCHGAMES,
|
||||
PATCHVERSTRING,
|
||||
SHOWGBABOOT,
|
||||
PATCHACCESS
|
||||
PATCHACCESS,
|
||||
HIDEPIN
|
||||
};
|
||||
|
||||
typedef enum ConfigurationStatus
|
||||
|
@ -124,7 +124,8 @@ void main(void)
|
||||
}
|
||||
|
||||
u32 pinMode = MULTICONFIG(PIN);
|
||||
bool pinExists = pinMode != 0 && verifyPin(pinMode);
|
||||
bool hidePin = CONFIG(HIDEPIN);
|
||||
bool pinExists = pinMode != 0 && verifyPin(pinMode, hidePin);
|
||||
|
||||
//If no configuration file exists or SELECT is held, load configuration menu
|
||||
bool shouldLoadConfigMenu = needConfig == CREATE_CONFIGURATION || ((pressed & (BUTTON_SELECT | BUTTON_L1)) == BUTTON_SELECT);
|
||||
|
@ -122,7 +122,7 @@ void newPin(bool allowSkipping, u32 pinMode)
|
||||
error("Error writing the PIN file");
|
||||
}
|
||||
|
||||
bool verifyPin(u32 pinMode)
|
||||
bool verifyPin(u32 pinMode, bool hidePin)
|
||||
{
|
||||
PinData pin;
|
||||
|
||||
@ -199,9 +199,9 @@ bool verifyPin(u32 pinMode)
|
||||
|
||||
//Add character to password
|
||||
enteredPassword[cnt] = (u8)pinKeyToLetter(pressed);
|
||||
|
||||
//Visualize character on screen
|
||||
drawCharacter((char)enteredPassword[cnt], true, 10 + (16 + 2 * cnt) * SPACING_X, 10 + 3 * SPACING_Y, COLOR_WHITE);
|
||||
char display = hidePin ? '*' : (char)enteredPassword[cnt];
|
||||
drawCharacter(display, true, 10 + (16 + 2 * cnt) * SPACING_X, 10 + 3 * SPACING_Y, COLOR_WHITE);
|
||||
|
||||
if(++cnt < lengthBlock[0]) continue;
|
||||
|
||||
|
@ -33,4 +33,4 @@
|
||||
#define PIN_VERSIONMINOR 3
|
||||
|
||||
void newPin(bool allowSkipping, u32 pinMode);
|
||||
bool verifyPin(u32 pinMode);
|
||||
bool verifyPin(u32 pinMode, bool hidePin);
|
Reference in New Issue
Block a user