summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/core/hle/service/am/am.cpp11
-rw-r--r--src/core/hle/service/am/applets/applet_cabinet.cpp5
-rw-r--r--src/core/hle/service/am/applets/applet_cabinet.h1
-rw-r--r--src/core/hle/service/am/applets/applet_controller.cpp5
-rw-r--r--src/core/hle/service/am/applets/applet_controller.h1
-rw-r--r--src/core/hle/service/am/applets/applet_error.cpp5
-rw-r--r--src/core/hle/service/am/applets/applet_error.h1
-rw-r--r--src/core/hle/service/am/applets/applet_general_backend.cpp15
-rw-r--r--src/core/hle/service/am/applets/applet_general_backend.h3
-rw-r--r--src/core/hle/service/am/applets/applet_mii_edit.cpp5
-rw-r--r--src/core/hle/service/am/applets/applet_mii_edit.h1
-rw-r--r--src/core/hle/service/am/applets/applet_profile_select.cpp5
-rw-r--r--src/core/hle/service/am/applets/applet_profile_select.h1
-rw-r--r--src/core/hle/service/am/applets/applet_software_keyboard.cpp5
-rw-r--r--src/core/hle/service/am/applets/applet_software_keyboard.h1
-rw-r--r--src/core/hle/service/am/applets/applet_web_browser.cpp5
-rw-r--r--src/core/hle/service/am/applets/applet_web_browser.h1
-rw-r--r--src/core/hle/service/am/applets/applets.h1
18 files changed, 71 insertions, 1 deletions
diff --git a/src/core/hle/service/am/am.cpp b/src/core/hle/service/am/am.cpp
index deeca925d..8943e4a81 100644
--- a/src/core/hle/service/am/am.cpp
+++ b/src/core/hle/service/am/am.cpp
@@ -945,7 +945,7 @@ public:
{0, &ILibraryAppletAccessor::GetAppletStateChangedEvent, "GetAppletStateChangedEvent"},
{1, &ILibraryAppletAccessor::IsCompleted, "IsCompleted"},
{10, &ILibraryAppletAccessor::Start, "Start"},
- {20, nullptr, "RequestExit"},
+ {20, &ILibraryAppletAccessor::RequestExit, "RequestExit"},
{25, nullptr, "Terminate"},
{30, &ILibraryAppletAccessor::GetResult, "GetResult"},
{50, nullptr, "SetOutOfFocusApplicationSuspendingEnabled"},
@@ -1010,6 +1010,15 @@ private:
rb.Push(ResultSuccess);
}
+ void RequestExit(HLERequestContext& ctx) {
+ LOG_DEBUG(Service_AM, "called");
+
+ ASSERT(applet != nullptr);
+
+ IPC::ResponseBuilder rb{ctx, 2};
+ rb.Push(applet->RequestExit());
+ }
+
void PushInData(HLERequestContext& ctx) {
LOG_DEBUG(Service_AM, "called");
diff --git a/src/core/hle/service/am/applets/applet_cabinet.cpp b/src/core/hle/service/am/applets/applet_cabinet.cpp
index 162687b29..d76a9ef5a 100644
--- a/src/core/hle/service/am/applets/applet_cabinet.cpp
+++ b/src/core/hle/service/am/applets/applet_cabinet.cpp
@@ -174,4 +174,9 @@ void Cabinet::Cancel() {
broker.SignalStateChanged();
}
+Result Cabinet::RequestExit() {
+ this->Cancel();
+ R_SUCCEED();
+}
+
} // namespace Service::AM::Applets
diff --git a/src/core/hle/service/am/applets/applet_cabinet.h b/src/core/hle/service/am/applets/applet_cabinet.h
index 84197a807..edd295a27 100644
--- a/src/core/hle/service/am/applets/applet_cabinet.h
+++ b/src/core/hle/service/am/applets/applet_cabinet.h
@@ -89,6 +89,7 @@ public:
void Execute() override;
void DisplayCompleted(bool apply_changes, std::string_view amiibo_name);
void Cancel();
+ Result RequestExit() override;
private:
const Core::Frontend::CabinetApplet& frontend;
diff --git a/src/core/hle/service/am/applets/applet_controller.cpp b/src/core/hle/service/am/applets/applet_controller.cpp
index 58484519b..11b64dbbd 100644
--- a/src/core/hle/service/am/applets/applet_controller.cpp
+++ b/src/core/hle/service/am/applets/applet_controller.cpp
@@ -262,4 +262,9 @@ void Controller::ConfigurationComplete() {
broker.SignalStateChanged();
}
+Result Controller::RequestExit() {
+ this->ConfigurationComplete();
+ R_SUCCEED();
+}
+
} // namespace Service::AM::Applets
diff --git a/src/core/hle/service/am/applets/applet_controller.h b/src/core/hle/service/am/applets/applet_controller.h
index 1f9adec65..1fbabee11 100644
--- a/src/core/hle/service/am/applets/applet_controller.h
+++ b/src/core/hle/service/am/applets/applet_controller.h
@@ -129,6 +129,7 @@ public:
Result GetStatus() const override;
void ExecuteInteractive() override;
void Execute() override;
+ Result RequestExit() override;
void ConfigurationComplete();
diff --git a/src/core/hle/service/am/applets/applet_error.cpp b/src/core/hle/service/am/applets/applet_error.cpp
index b013896b4..d6935c09d 100644
--- a/src/core/hle/service/am/applets/applet_error.cpp
+++ b/src/core/hle/service/am/applets/applet_error.cpp
@@ -209,4 +209,9 @@ void Error::DisplayCompleted() {
broker.SignalStateChanged();
}
+Result Error::RequestExit() {
+ this->DisplayCompleted();
+ R_SUCCEED();
+}
+
} // namespace Service::AM::Applets
diff --git a/src/core/hle/service/am/applets/applet_error.h b/src/core/hle/service/am/applets/applet_error.h
index d78d6f1d1..d822a32bb 100644
--- a/src/core/hle/service/am/applets/applet_error.h
+++ b/src/core/hle/service/am/applets/applet_error.h
@@ -34,6 +34,7 @@ public:
Result GetStatus() const override;
void ExecuteInteractive() override;
void Execute() override;
+ Result RequestExit() override;
void DisplayCompleted();
diff --git a/src/core/hle/service/am/applets/applet_general_backend.cpp b/src/core/hle/service/am/applets/applet_general_backend.cpp
index 1eefa85e3..baf680040 100644
--- a/src/core/hle/service/am/applets/applet_general_backend.cpp
+++ b/src/core/hle/service/am/applets/applet_general_backend.cpp
@@ -150,6 +150,11 @@ void Auth::AuthFinished(bool is_successful) {
broker.SignalStateChanged();
}
+Result Auth::RequestExit() {
+ this->AuthFinished(false);
+ R_SUCCEED();
+}
+
PhotoViewer::PhotoViewer(Core::System& system_, LibraryAppletMode applet_mode_,
const Core::Frontend::PhotoViewerApplet& frontend_)
: Applet{system_, applet_mode_}, frontend{frontend_}, system{system_} {}
@@ -202,6 +207,11 @@ void PhotoViewer::ViewFinished() {
broker.SignalStateChanged();
}
+Result PhotoViewer::RequestExit() {
+ this->ViewFinished();
+ R_SUCCEED();
+}
+
StubApplet::StubApplet(Core::System& system_, AppletId id_, LibraryAppletMode applet_mode_)
: Applet{system_, applet_mode_}, id{id_}, system{system_} {}
@@ -250,4 +260,9 @@ void StubApplet::Execute() {
broker.SignalStateChanged();
}
+Result StubApplet::RequestExit() {
+ // Nothing to do.
+ R_SUCCEED();
+}
+
} // namespace Service::AM::Applets
diff --git a/src/core/hle/service/am/applets/applet_general_backend.h b/src/core/hle/service/am/applets/applet_general_backend.h
index a9f2535a2..34ecaebb9 100644
--- a/src/core/hle/service/am/applets/applet_general_backend.h
+++ b/src/core/hle/service/am/applets/applet_general_backend.h
@@ -28,6 +28,7 @@ public:
Result GetStatus() const override;
void ExecuteInteractive() override;
void Execute() override;
+ Result RequestExit() override;
void AuthFinished(bool is_successful = true);
@@ -59,6 +60,7 @@ public:
Result GetStatus() const override;
void ExecuteInteractive() override;
void Execute() override;
+ Result RequestExit() override;
void ViewFinished();
@@ -80,6 +82,7 @@ public:
Result GetStatus() const override;
void ExecuteInteractive() override;
void Execute() override;
+ Result RequestExit() override;
private:
AppletId id;
diff --git a/src/core/hle/service/am/applets/applet_mii_edit.cpp b/src/core/hle/service/am/applets/applet_mii_edit.cpp
index ae80ef506..a4a3f3cfa 100644
--- a/src/core/hle/service/am/applets/applet_mii_edit.cpp
+++ b/src/core/hle/service/am/applets/applet_mii_edit.cpp
@@ -135,4 +135,9 @@ void MiiEdit::MiiEditOutputForCharInfoEditing(MiiEditResult result,
broker.SignalStateChanged();
}
+Result MiiEdit::RequestExit() {
+ this->MiiEditOutput(MiiEditResult::Cancel, -1);
+ R_SUCCEED();
+}
+
} // namespace Service::AM::Applets
diff --git a/src/core/hle/service/am/applets/applet_mii_edit.h b/src/core/hle/service/am/applets/applet_mii_edit.h
index d18dd3cf5..3f46fae1b 100644
--- a/src/core/hle/service/am/applets/applet_mii_edit.h
+++ b/src/core/hle/service/am/applets/applet_mii_edit.h
@@ -25,6 +25,7 @@ public:
Result GetStatus() const override;
void ExecuteInteractive() override;
void Execute() override;
+ Result RequestExit() override;
void MiiEditOutput(MiiEditResult result, s32 index);
diff --git a/src/core/hle/service/am/applets/applet_profile_select.cpp b/src/core/hle/service/am/applets/applet_profile_select.cpp
index 1d69f5447..5486d80dc 100644
--- a/src/core/hle/service/am/applets/applet_profile_select.cpp
+++ b/src/core/hle/service/am/applets/applet_profile_select.cpp
@@ -73,4 +73,9 @@ void ProfileSelect::SelectionComplete(std::optional<Common::UUID> uuid) {
broker.SignalStateChanged();
}
+Result ProfileSelect::RequestExit() {
+ this->SelectionComplete(std::nullopt);
+ R_SUCCEED();
+}
+
} // namespace Service::AM::Applets
diff --git a/src/core/hle/service/am/applets/applet_profile_select.h b/src/core/hle/service/am/applets/applet_profile_select.h
index b77f1d205..85705c216 100644
--- a/src/core/hle/service/am/applets/applet_profile_select.h
+++ b/src/core/hle/service/am/applets/applet_profile_select.h
@@ -42,6 +42,7 @@ public:
Result GetStatus() const override;
void ExecuteInteractive() override;
void Execute() override;
+ Result RequestExit() override;
void SelectionComplete(std::optional<Common::UUID> uuid);
diff --git a/src/core/hle/service/am/applets/applet_software_keyboard.cpp b/src/core/hle/service/am/applets/applet_software_keyboard.cpp
index c18236045..6f7499731 100644
--- a/src/core/hle/service/am/applets/applet_software_keyboard.cpp
+++ b/src/core/hle/service/am/applets/applet_software_keyboard.cpp
@@ -770,6 +770,11 @@ void SoftwareKeyboard::ExitKeyboard() {
broker.SignalStateChanged();
}
+Result SoftwareKeyboard::RequestExit() {
+ this->ExitKeyboard();
+ R_SUCCEED();
+}
+
// Inline Software Keyboard Requests
void SoftwareKeyboard::RequestFinalize(const std::vector<u8>& request_data) {
diff --git a/src/core/hle/service/am/applets/applet_software_keyboard.h b/src/core/hle/service/am/applets/applet_software_keyboard.h
index b01b31c98..2e919811b 100644
--- a/src/core/hle/service/am/applets/applet_software_keyboard.h
+++ b/src/core/hle/service/am/applets/applet_software_keyboard.h
@@ -31,6 +31,7 @@ public:
Result GetStatus() const override;
void ExecuteInteractive() override;
void Execute() override;
+ Result RequestExit() override;
/**
* Submits the input text to the application.
diff --git a/src/core/hle/service/am/applets/applet_web_browser.cpp b/src/core/hle/service/am/applets/applet_web_browser.cpp
index f061bae80..59359e4d3 100644
--- a/src/core/hle/service/am/applets/applet_web_browser.cpp
+++ b/src/core/hle/service/am/applets/applet_web_browser.cpp
@@ -363,6 +363,11 @@ void WebBrowser::WebBrowserExit(WebExitReason exit_reason, std::string last_url)
broker.SignalStateChanged();
}
+Result WebBrowser::RequestExit() {
+ this->WebBrowserExit(WebExitReason::ExitRequested);
+ R_SUCCEED();
+}
+
bool WebBrowser::InputTLVExistsInMap(WebArgInputTLVType input_tlv_type) const {
return web_arg_input_tlv_map.find(input_tlv_type) != web_arg_input_tlv_map.end();
}
diff --git a/src/core/hle/service/am/applets/applet_web_browser.h b/src/core/hle/service/am/applets/applet_web_browser.h
index fd727fac8..99fe18659 100644
--- a/src/core/hle/service/am/applets/applet_web_browser.h
+++ b/src/core/hle/service/am/applets/applet_web_browser.h
@@ -35,6 +35,7 @@ public:
Result GetStatus() const override;
void ExecuteInteractive() override;
void Execute() override;
+ Result RequestExit() override;
void ExtractOfflineRomFS();
diff --git a/src/core/hle/service/am/applets/applets.h b/src/core/hle/service/am/applets/applets.h
index a22eb62a8..12f374199 100644
--- a/src/core/hle/service/am/applets/applets.h
+++ b/src/core/hle/service/am/applets/applets.h
@@ -142,6 +142,7 @@ public:
virtual Result GetStatus() const = 0;
virtual void ExecuteInteractive() = 0;
virtual void Execute() = 0;
+ virtual Result RequestExit() = 0;
AppletDataBroker& GetBroker() {
return broker;