mirror of
https://gitlab.com/suyu-emu/suyu.git
synced 2024-03-15 23:15:44 +00:00
Merge pull request #1889 from DarkLordZach/swkbd-state-changed
applets: Correct usage of SignalStateChanged event
This commit is contained in:
commit
116e6247ce
|
@ -565,7 +565,6 @@ private:
|
||||||
void GetAppletStateChangedEvent(Kernel::HLERequestContext& ctx) {
|
void GetAppletStateChangedEvent(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
applet->GetBroker().SignalStateChanged();
|
|
||||||
const auto event = applet->GetBroker().GetStateChangedEvent();
|
const auto event = applet->GetBroker().GetStateChangedEvent();
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 1};
|
||||||
|
|
|
@ -16,11 +16,11 @@ namespace Service::AM::Applets {
|
||||||
AppletDataBroker::AppletDataBroker() {
|
AppletDataBroker::AppletDataBroker() {
|
||||||
auto& kernel = Core::System::GetInstance().Kernel();
|
auto& kernel = Core::System::GetInstance().Kernel();
|
||||||
state_changed_event = Kernel::WritableEvent::CreateEventPair(
|
state_changed_event = Kernel::WritableEvent::CreateEventPair(
|
||||||
kernel, Kernel::ResetType::OneShot, "ILibraryAppletAccessor:StateChangedEvent");
|
kernel, Kernel::ResetType::Sticky, "ILibraryAppletAccessor:StateChangedEvent");
|
||||||
pop_out_data_event = Kernel::WritableEvent::CreateEventPair(
|
pop_out_data_event = Kernel::WritableEvent::CreateEventPair(
|
||||||
kernel, Kernel::ResetType::OneShot, "ILibraryAppletAccessor:PopDataOutEvent");
|
kernel, Kernel::ResetType::Sticky, "ILibraryAppletAccessor:PopDataOutEvent");
|
||||||
pop_interactive_out_data_event = Kernel::WritableEvent::CreateEventPair(
|
pop_interactive_out_data_event = Kernel::WritableEvent::CreateEventPair(
|
||||||
kernel, Kernel::ResetType::OneShot, "ILibraryAppletAccessor:PopInteractiveDataOutEvent");
|
kernel, Kernel::ResetType::Sticky, "ILibraryAppletAccessor:PopInteractiveDataOutEvent");
|
||||||
}
|
}
|
||||||
|
|
||||||
AppletDataBroker::~AppletDataBroker() = default;
|
AppletDataBroker::~AppletDataBroker() = default;
|
||||||
|
|
|
@ -146,11 +146,10 @@ void SoftwareKeyboard::WriteText(std::optional<std::u16string> text) {
|
||||||
|
|
||||||
if (complete) {
|
if (complete) {
|
||||||
broker.PushNormalDataFromApplet(IStorage{output_main});
|
broker.PushNormalDataFromApplet(IStorage{output_main});
|
||||||
|
broker.SignalStateChanged();
|
||||||
} else {
|
} else {
|
||||||
broker.PushInteractiveDataFromApplet(IStorage{output_sub});
|
broker.PushInteractiveDataFromApplet(IStorage{output_sub});
|
||||||
}
|
}
|
||||||
|
|
||||||
broker.SignalStateChanged();
|
|
||||||
} else {
|
} else {
|
||||||
output_main[0] = 1;
|
output_main[0] = 1;
|
||||||
complete = true;
|
complete = true;
|
||||||
|
|
Loading…
Reference in a new issue