mirror of
https://github.com/wiidev/usbloadergx.git
synced 2024-11-29 14:44:17 +01:00
22 lines
471 B
C++
22 lines
471 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;
|
||
|
}
|