mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-07-11 01:25:07 +02:00
iOS: Close the keyboard on one more event. Makes it easier to get rid of it if it gets stuck.
This commit is contained in:
@@ -61,6 +61,7 @@ void System_LaunchUrl(LaunchUrlType urlType, std::string_view url);
|
||||
enum class UIEventNotification {
|
||||
MENU_RETURN,
|
||||
POPUP_CLOSED,
|
||||
DIALOG_CLOSED,
|
||||
TEXT_GOTFOCUS,
|
||||
TEXT_LOSTFOCUS,
|
||||
};
|
||||
|
||||
@@ -264,6 +264,10 @@ void UIDialogScreen::sendMessage(UIMessage message, const char *value) {
|
||||
}
|
||||
}
|
||||
|
||||
UIDialogScreen::~UIDialogScreen() {
|
||||
System_NotifyUIEvent(UIEventNotification::DIALOG_CLOSED);
|
||||
}
|
||||
|
||||
bool UIScreen::IsOnTop() const {
|
||||
return screenManager()->topScreen() == this;
|
||||
}
|
||||
|
||||
@@ -91,6 +91,7 @@ private:
|
||||
class UIDialogScreen : public UIScreen {
|
||||
public:
|
||||
UIDialogScreen() : UIScreen(), finished_(false) {}
|
||||
~UIDialogScreen() override;
|
||||
bool key(const KeyInput &key) override;
|
||||
void sendMessage(UIMessage message, const char *value) override;
|
||||
|
||||
|
||||
@@ -209,6 +209,7 @@
|
||||
}
|
||||
|
||||
[picker dismissViewControllerAnimated:YES completion:nil];
|
||||
|
||||
[self hideKeyboard];
|
||||
}
|
||||
|
||||
|
||||
@@ -533,6 +533,7 @@ bool System_MakeRequest(SystemRequestType type, int requestId, const std::string
|
||||
{
|
||||
switch ((UIEventNotification)param3) {
|
||||
case UIEventNotification::POPUP_CLOSED:
|
||||
case UIEventNotification::DIALOG_CLOSED:
|
||||
[sharedViewController hideKeyboard];
|
||||
break;
|
||||
case UIEventNotification::TEXT_GOTFOCUS:
|
||||
|
||||
Reference in New Issue
Block a user