mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-30 09:43:45 +01:00
Add a new "System" request for a username-password dialog box
This commit is contained in:
1 parent
d35c17229c
commit
2708f0b93e
7 files changed
+93
-7
No files matched your search
@@ -358,6 +358,8 @@ bool System_GetPropertyBool(SystemProperty prop) {
|
||||
return true;
|
||||
case SYSPROP_HAS_BACK_BUTTON:
|
||||
return true;
|
||||
case SYSPROP_HAS_LOGIN_DIALOG:
|
||||
return true;
|
||||
case SYSPROP_APP_GOLD:
|
||||
#ifdef GOLD
|
||||
return true;
|
||||
@@ -498,6 +500,17 @@ bool System_MakeRequest(SystemRequestType type, int requestId, const std::string
|
||||
}
|
||||
}).detach();
|
||||
return true;
|
||||
case SystemRequestType::ASK_USERNAME_PASSWORD:
|
||||
std::thread([=] {
|
||||
std::string username;
|
||||
std::string password;
|
||||
if (UserPasswordBox_GetStrings(MainWindow::GetHInstance(), MainWindow::GetHWND(), ConvertUTF8ToWString(param1).c_str(), &username, &password)) {
|
||||
g_requestManager.PostSystemSuccess(requestId, (username + '\n' + password).c_str());
|
||||
} else {
|
||||
g_requestManager.PostSystemFailure(requestId);
|
||||
}
|
||||
}).detach();
|
||||
return true;
|
||||
case SystemRequestType::BROWSE_FOR_IMAGE:
|
||||
std::thread([=] {
|
||||
std::string out;
|
||||
|
||||
Reference in new issue
Block a user