mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-07-11 01:25:07 +02:00
Fix problem with AskForInput when there's no native text input dialog (iOS, Mac, Linux)
This commit is contained in:
@@ -800,7 +800,7 @@ void AskForInput(ScreenManager *screenManager, RequesterToken token, UI::View *s
|
||||
popupScreen->SetAlignTop(true);
|
||||
}
|
||||
popupScreen->OnChange.Add([callback, sourceView](EventParams &e) {
|
||||
callback(SanitizeString(StripSpaces(*(std::string *)e.v), StringRestriction::None, 0, 0), true);
|
||||
callback(SanitizeString(StripSpaces(e.s), StringRestriction::None, 0, 0), true);
|
||||
if (sourceView) {
|
||||
SetFocusedView(sourceView);
|
||||
}
|
||||
@@ -838,6 +838,7 @@ void PopupTextInputChoice::HandleClick(EventParams &e) {
|
||||
*value_ = StripSpaces(SanitizeString(*value_, restriction_, minLen_, maxLen_));
|
||||
EventParams params{};
|
||||
params.v = this;
|
||||
params.s = *value_;
|
||||
OnChange.Trigger(params);
|
||||
if (restoreFocus_) {
|
||||
SetFocusedView(this);
|
||||
@@ -991,6 +992,7 @@ void TextEditPopupScreen::OnCompleted(DialogResult result) {
|
||||
*value_ = StripSpaces(edit_->GetText());
|
||||
EventParams e{};
|
||||
e.v = edit_;
|
||||
e.s = *value_;
|
||||
OnChange.Trigger(e);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user