diff options
author | Liam <byteslice@airmail.cc> | 2023-12-31 15:40:32 +0100 |
---|---|---|
committer | Liam <byteslice@airmail.cc> | 2024-01-30 00:43:45 +0100 |
commit | dfb9fa0144ca79e596f6f2b1bc960b1a44745aa6 (patch) | |
tree | b90633109392383feaa8420e984c40c9a1799903 /src/core/hle/service/am/frontend/applet_error.h | |
parent | am: add new datatypes for per-applet state (diff) | |
download | yuzu-dfb9fa0144ca79e596f6f2b1bc960b1a44745aa6.tar yuzu-dfb9fa0144ca79e596f6f2b1bc960b1a44745aa6.tar.gz yuzu-dfb9fa0144ca79e596f6f2b1bc960b1a44745aa6.tar.bz2 yuzu-dfb9fa0144ca79e596f6f2b1bc960b1a44745aa6.tar.lz yuzu-dfb9fa0144ca79e596f6f2b1bc960b1a44745aa6.tar.xz yuzu-dfb9fa0144ca79e596f6f2b1bc960b1a44745aa6.tar.zst yuzu-dfb9fa0144ca79e596f6f2b1bc960b1a44745aa6.zip |
Diffstat (limited to 'src/core/hle/service/am/frontend/applet_error.h')
-rw-r--r-- | src/core/hle/service/am/frontend/applet_error.h | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/src/core/hle/service/am/frontend/applet_error.h b/src/core/hle/service/am/frontend/applet_error.h new file mode 100644 index 000000000..639e3c224 --- /dev/null +++ b/src/core/hle/service/am/frontend/applet_error.h @@ -0,0 +1,53 @@ +// SPDX-FileCopyrightText: Copyright 2019 yuzu Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include "core/hle/result.h" +#include "core/hle/service/am/frontend/applets.h" + +namespace Core { +class System; +} + +namespace Service::AM::Frontend { + +enum class ErrorAppletMode : u8 { + ShowError = 0, + ShowSystemError = 1, + ShowApplicationError = 2, + ShowEula = 3, + ShowErrorPctl = 4, + ShowErrorRecord = 5, + ShowUpdateEula = 8, +}; + +class Error final : public FrontendApplet { +public: + explicit Error(Core::System& system_, LibraryAppletMode applet_mode_, + const Core::Frontend::ErrorApplet& frontend_); + ~Error() override; + + void Initialize() override; + + bool TransactionComplete() const override; + Result GetStatus() const override; + void ExecuteInteractive() override; + void Execute() override; + Result RequestExit() override; + + void DisplayCompleted(); + +private: + union ErrorArguments; + + const Core::Frontend::ErrorApplet& frontend; + Result error_code = ResultSuccess; + ErrorAppletMode mode = ErrorAppletMode::ShowError; + std::unique_ptr<ErrorArguments> args; + + bool complete = false; + Core::System& system; +}; + +} // namespace Service::AM::Frontend |