early-access version 2191
This commit is contained in:
parent
33105d985c
commit
d701e13d49
10 changed files with 38 additions and 27 deletions
|
@ -1,7 +1,7 @@
|
||||||
yuzu emulator early access
|
yuzu emulator early access
|
||||||
=============
|
=============
|
||||||
|
|
||||||
This is the source code for early-access 2189.
|
This is the source code for early-access 2191.
|
||||||
|
|
||||||
## Legal Notice
|
## Legal Notice
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,8 @@ DefaultSoftwareKeyboardApplet::~DefaultSoftwareKeyboardApplet() = default;
|
||||||
|
|
||||||
void DefaultSoftwareKeyboardApplet::InitializeKeyboard(
|
void DefaultSoftwareKeyboardApplet::InitializeKeyboard(
|
||||||
bool is_inline, KeyboardInitializeParameters initialize_parameters,
|
bool is_inline, KeyboardInitializeParameters initialize_parameters,
|
||||||
std::function<void(Service::AM::Applets::SwkbdResult, std::u16string)> submit_normal_callback_,
|
std::function<void(Service::AM::Applets::SwkbdResult, std::u16string, bool)>
|
||||||
|
submit_normal_callback_,
|
||||||
std::function<void(Service::AM::Applets::SwkbdReplyType, std::u16string, s32)>
|
std::function<void(Service::AM::Applets::SwkbdReplyType, std::u16string, s32)>
|
||||||
submit_inline_callback_) {
|
submit_inline_callback_) {
|
||||||
if (is_inline) {
|
if (is_inline) {
|
||||||
|
@ -128,7 +129,7 @@ void DefaultSoftwareKeyboardApplet::ExitKeyboard() const {
|
||||||
}
|
}
|
||||||
|
|
||||||
void DefaultSoftwareKeyboardApplet::SubmitNormalText(std::u16string text) const {
|
void DefaultSoftwareKeyboardApplet::SubmitNormalText(std::u16string text) const {
|
||||||
submit_normal_callback(Service::AM::Applets::SwkbdResult::Ok, text);
|
submit_normal_callback(Service::AM::Applets::SwkbdResult::Ok, text, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DefaultSoftwareKeyboardApplet::SubmitInlineText(std::u16string_view text) const {
|
void DefaultSoftwareKeyboardApplet::SubmitInlineText(std::u16string_view text) const {
|
||||||
|
|
|
@ -57,7 +57,7 @@ public:
|
||||||
|
|
||||||
virtual void InitializeKeyboard(
|
virtual void InitializeKeyboard(
|
||||||
bool is_inline, KeyboardInitializeParameters initialize_parameters,
|
bool is_inline, KeyboardInitializeParameters initialize_parameters,
|
||||||
std::function<void(Service::AM::Applets::SwkbdResult, std::u16string)>
|
std::function<void(Service::AM::Applets::SwkbdResult, std::u16string, bool)>
|
||||||
submit_normal_callback_,
|
submit_normal_callback_,
|
||||||
std::function<void(Service::AM::Applets::SwkbdReplyType, std::u16string, s32)>
|
std::function<void(Service::AM::Applets::SwkbdReplyType, std::u16string, s32)>
|
||||||
submit_inline_callback_) = 0;
|
submit_inline_callback_) = 0;
|
||||||
|
@ -82,7 +82,7 @@ public:
|
||||||
|
|
||||||
void InitializeKeyboard(
|
void InitializeKeyboard(
|
||||||
bool is_inline, KeyboardInitializeParameters initialize_parameters,
|
bool is_inline, KeyboardInitializeParameters initialize_parameters,
|
||||||
std::function<void(Service::AM::Applets::SwkbdResult, std::u16string)>
|
std::function<void(Service::AM::Applets::SwkbdResult, std::u16string, bool)>
|
||||||
submit_normal_callback_,
|
submit_normal_callback_,
|
||||||
std::function<void(Service::AM::Applets::SwkbdReplyType, std::u16string, s32)>
|
std::function<void(Service::AM::Applets::SwkbdReplyType, std::u16string, s32)>
|
||||||
submit_inline_callback_) override;
|
submit_inline_callback_) override;
|
||||||
|
@ -106,7 +106,7 @@ private:
|
||||||
|
|
||||||
KeyboardInitializeParameters parameters;
|
KeyboardInitializeParameters parameters;
|
||||||
|
|
||||||
mutable std::function<void(Service::AM::Applets::SwkbdResult, std::u16string)>
|
mutable std::function<void(Service::AM::Applets::SwkbdResult, std::u16string, bool)>
|
||||||
submit_normal_callback;
|
submit_normal_callback;
|
||||||
mutable std::function<void(Service::AM::Applets::SwkbdReplyType, std::u16string, s32)>
|
mutable std::function<void(Service::AM::Applets::SwkbdReplyType, std::u16string, s32)>
|
||||||
submit_inline_callback;
|
submit_inline_callback;
|
||||||
|
|
|
@ -109,13 +109,18 @@ void SoftwareKeyboard::Execute() {
|
||||||
ShowNormalKeyboard();
|
ShowNormalKeyboard();
|
||||||
}
|
}
|
||||||
|
|
||||||
void SoftwareKeyboard::SubmitTextNormal(SwkbdResult result, std::u16string submitted_text) {
|
void SoftwareKeyboard::SubmitTextNormal(SwkbdResult result, std::u16string submitted_text,
|
||||||
|
bool confirmed) {
|
||||||
if (complete) {
|
if (complete) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (swkbd_config_common.use_text_check && result == SwkbdResult::Ok) {
|
if (swkbd_config_common.use_text_check && result == SwkbdResult::Ok) {
|
||||||
SubmitForTextCheck(submitted_text);
|
if (confirmed) {
|
||||||
|
SubmitNormalOutputAndExit(result, submitted_text);
|
||||||
|
} else {
|
||||||
|
SubmitForTextCheck(submitted_text);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
SubmitNormalOutputAndExit(result, submitted_text);
|
SubmitNormalOutputAndExit(result, submitted_text);
|
||||||
}
|
}
|
||||||
|
@ -583,11 +588,12 @@ void SoftwareKeyboard::InitializeFrontendKeyboard() {
|
||||||
.disable_cancel_button{disable_cancel_button},
|
.disable_cancel_button{disable_cancel_button},
|
||||||
};
|
};
|
||||||
|
|
||||||
frontend.InitializeKeyboard(false, std::move(initialize_parameters),
|
frontend.InitializeKeyboard(
|
||||||
[this](SwkbdResult result, std::u16string submitted_text) {
|
false, std::move(initialize_parameters),
|
||||||
SubmitTextNormal(result, submitted_text);
|
[this](SwkbdResult result, std::u16string submitted_text, bool confirmed) {
|
||||||
},
|
SubmitTextNormal(result, submitted_text, confirmed);
|
||||||
{});
|
},
|
||||||
|
{});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -36,8 +36,9 @@ public:
|
||||||
*
|
*
|
||||||
* @param result SwkbdResult enum
|
* @param result SwkbdResult enum
|
||||||
* @param submitted_text UTF-16 encoded string
|
* @param submitted_text UTF-16 encoded string
|
||||||
|
* @param confirmed Whether the text has been confirmed after TextCheckResult::Confirm
|
||||||
*/
|
*/
|
||||||
void SubmitTextNormal(SwkbdResult result, std::u16string submitted_text);
|
void SubmitTextNormal(SwkbdResult result, std::u16string submitted_text, bool confirmed);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Submits the input text to the application.
|
* Submits the input text to the application.
|
||||||
|
|
|
@ -416,7 +416,7 @@ void QtSoftwareKeyboardDialog::ShowTextCheckDialog(
|
||||||
? ui->text_edit_osk->toPlainText().toStdU16String()
|
? ui->text_edit_osk->toPlainText().toStdU16String()
|
||||||
: ui->line_edit_osk->text().toStdU16String();
|
: ui->line_edit_osk->text().toStdU16String();
|
||||||
|
|
||||||
emit SubmitNormalText(SwkbdResult::Ok, std::move(text));
|
emit SubmitNormalText(SwkbdResult::Ok, std::move(text), true);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1520,7 +1520,8 @@ QtSoftwareKeyboard::~QtSoftwareKeyboard() = default;
|
||||||
|
|
||||||
void QtSoftwareKeyboard::InitializeKeyboard(
|
void QtSoftwareKeyboard::InitializeKeyboard(
|
||||||
bool is_inline, Core::Frontend::KeyboardInitializeParameters initialize_parameters,
|
bool is_inline, Core::Frontend::KeyboardInitializeParameters initialize_parameters,
|
||||||
std::function<void(Service::AM::Applets::SwkbdResult, std::u16string)> submit_normal_callback_,
|
std::function<void(Service::AM::Applets::SwkbdResult, std::u16string, bool)>
|
||||||
|
submit_normal_callback_,
|
||||||
std::function<void(Service::AM::Applets::SwkbdReplyType, std::u16string, s32)>
|
std::function<void(Service::AM::Applets::SwkbdReplyType, std::u16string, s32)>
|
||||||
submit_inline_callback_) {
|
submit_inline_callback_) {
|
||||||
if (is_inline) {
|
if (is_inline) {
|
||||||
|
@ -1619,8 +1620,8 @@ void QtSoftwareKeyboard::ExitKeyboard() const {
|
||||||
}
|
}
|
||||||
|
|
||||||
void QtSoftwareKeyboard::SubmitNormalText(Service::AM::Applets::SwkbdResult result,
|
void QtSoftwareKeyboard::SubmitNormalText(Service::AM::Applets::SwkbdResult result,
|
||||||
std::u16string submitted_text) const {
|
std::u16string submitted_text, bool confirmed) const {
|
||||||
submit_normal_callback(result, submitted_text);
|
submit_normal_callback(result, submitted_text, confirmed);
|
||||||
}
|
}
|
||||||
|
|
||||||
void QtSoftwareKeyboard::SubmitInlineText(Service::AM::Applets::SwkbdReplyType reply_type,
|
void QtSoftwareKeyboard::SubmitInlineText(Service::AM::Applets::SwkbdReplyType reply_type,
|
||||||
|
|
|
@ -53,8 +53,8 @@ public:
|
||||||
void ExitKeyboard();
|
void ExitKeyboard();
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void SubmitNormalText(Service::AM::Applets::SwkbdResult result,
|
void SubmitNormalText(Service::AM::Applets::SwkbdResult result, std::u16string submitted_text,
|
||||||
std::u16string submitted_text) const;
|
bool confirmed = false) const;
|
||||||
|
|
||||||
void SubmitInlineText(Service::AM::Applets::SwkbdReplyType reply_type,
|
void SubmitInlineText(Service::AM::Applets::SwkbdReplyType reply_type,
|
||||||
std::u16string submitted_text, s32 cursor_position) const;
|
std::u16string submitted_text, s32 cursor_position) const;
|
||||||
|
@ -236,7 +236,7 @@ public:
|
||||||
|
|
||||||
void InitializeKeyboard(
|
void InitializeKeyboard(
|
||||||
bool is_inline, Core::Frontend::KeyboardInitializeParameters initialize_parameters,
|
bool is_inline, Core::Frontend::KeyboardInitializeParameters initialize_parameters,
|
||||||
std::function<void(Service::AM::Applets::SwkbdResult, std::u16string)>
|
std::function<void(Service::AM::Applets::SwkbdResult, std::u16string, bool)>
|
||||||
submit_normal_callback_,
|
submit_normal_callback_,
|
||||||
std::function<void(Service::AM::Applets::SwkbdReplyType, std::u16string, s32)>
|
std::function<void(Service::AM::Applets::SwkbdReplyType, std::u16string, s32)>
|
||||||
submit_inline_callback_) override;
|
submit_inline_callback_) override;
|
||||||
|
@ -274,13 +274,13 @@ signals:
|
||||||
void MainWindowExitKeyboard() const;
|
void MainWindowExitKeyboard() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void SubmitNormalText(Service::AM::Applets::SwkbdResult result,
|
void SubmitNormalText(Service::AM::Applets::SwkbdResult result, std::u16string submitted_text,
|
||||||
std::u16string submitted_text) const;
|
bool confirmed) const;
|
||||||
|
|
||||||
void SubmitInlineText(Service::AM::Applets::SwkbdReplyType reply_type,
|
void SubmitInlineText(Service::AM::Applets::SwkbdReplyType reply_type,
|
||||||
std::u16string submitted_text, s32 cursor_position) const;
|
std::u16string submitted_text, s32 cursor_position) const;
|
||||||
|
|
||||||
mutable std::function<void(Service::AM::Applets::SwkbdResult, std::u16string)>
|
mutable std::function<void(Service::AM::Applets::SwkbdResult, std::u16string, bool)>
|
||||||
submit_normal_callback;
|
submit_normal_callback;
|
||||||
mutable std::function<void(Service::AM::Applets::SwkbdReplyType, std::u16string, s32)>
|
mutable std::function<void(Service::AM::Applets::SwkbdReplyType, std::u16string, s32)>
|
||||||
submit_inline_callback;
|
submit_inline_callback;
|
||||||
|
|
|
@ -846,6 +846,7 @@ void ConfigureInputPlayer::SetConnectableControllers() {
|
||||||
|
|
||||||
if (!is_powered_on) {
|
if (!is_powered_on) {
|
||||||
add_controllers(true);
|
add_controllers(true);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
add_controllers(false, hid_core.GetSupportedStyleTag());
|
add_controllers(false, hid_core.GetSupportedStyleTag());
|
||||||
|
|
|
@ -490,8 +490,9 @@ void GMainWindow::SoftwareKeyboardInitialize(
|
||||||
} else {
|
} else {
|
||||||
connect(
|
connect(
|
||||||
software_keyboard, &QtSoftwareKeyboardDialog::SubmitNormalText, this,
|
software_keyboard, &QtSoftwareKeyboardDialog::SubmitNormalText, this,
|
||||||
[this](Service::AM::Applets::SwkbdResult result, std::u16string submitted_text) {
|
[this](Service::AM::Applets::SwkbdResult result, std::u16string submitted_text,
|
||||||
emit SoftwareKeyboardSubmitNormalText(result, submitted_text);
|
bool confirmed) {
|
||||||
|
emit SoftwareKeyboardSubmitNormalText(result, submitted_text, confirmed);
|
||||||
},
|
},
|
||||||
Qt::QueuedConnection);
|
Qt::QueuedConnection);
|
||||||
}
|
}
|
||||||
|
|
|
@ -150,7 +150,7 @@ signals:
|
||||||
void ProfileSelectorFinishedSelection(std::optional<Common::UUID> uuid);
|
void ProfileSelectorFinishedSelection(std::optional<Common::UUID> uuid);
|
||||||
|
|
||||||
void SoftwareKeyboardSubmitNormalText(Service::AM::Applets::SwkbdResult result,
|
void SoftwareKeyboardSubmitNormalText(Service::AM::Applets::SwkbdResult result,
|
||||||
std::u16string submitted_text);
|
std::u16string submitted_text, bool confirmed);
|
||||||
void SoftwareKeyboardSubmitInlineText(Service::AM::Applets::SwkbdReplyType reply_type,
|
void SoftwareKeyboardSubmitInlineText(Service::AM::Applets::SwkbdReplyType reply_type,
|
||||||
std::u16string submitted_text, s32 cursor_position);
|
std::u16string submitted_text, s32 cursor_position);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue