mirror of
https://github.com/wiidev/usbloadergx.git
synced 2024-11-18 09:19:17 +01:00
973d8b2005
*Converted every 4 spaces to a tab to make the source consistent on those
22 lines
411 B
C++
22 lines
411 B
C++
#include "prompts/PromptWindows.h"
|
|
|
|
int PasswordCheck(const char * password)
|
|
{
|
|
if(!password || strcmp(password, "") == 0 || strcmp(password, "not set") == 0)
|
|
return 2;
|
|
|
|
char entered[100];
|
|
memset(entered, 0, sizeof(entered));
|
|
|
|
int result = OnScreenKeyboard(entered, 20, 0);
|
|
if (result == 1)
|
|
{
|
|
if (strcmp(entered, password) == 0) //if password correct
|
|
return 1;
|
|
else
|
|
return -1;
|
|
}
|
|
|
|
return 0;
|
|
}
|