diff options
author | Zach Hilman <zachhilman@gmail.com> | 2019-04-05 00:09:42 +0200 |
---|---|---|
committer | Zach Hilman <zachhilman@gmail.com> | 2019-04-17 17:35:24 +0200 |
commit | 2adb226b26f7f4b9a2c5cd4ea056479d7b5c1527 (patch) | |
tree | dab1215651c1855ba471c5c69b7c2c7f9e2e24ba /src/core/hle/service | |
parent | main: Add GMainWindow hooks for Error display (diff) | |
download | yuzu-2adb226b26f7f4b9a2c5cd4ea056479d7b5c1527.tar yuzu-2adb226b26f7f4b9a2c5cd4ea056479d7b5c1527.tar.gz yuzu-2adb226b26f7f4b9a2c5cd4ea056479d7b5c1527.tar.bz2 yuzu-2adb226b26f7f4b9a2c5cd4ea056479d7b5c1527.tar.lz yuzu-2adb226b26f7f4b9a2c5cd4ea056479d7b5c1527.tar.xz yuzu-2adb226b26f7f4b9a2c5cd4ea056479d7b5c1527.tar.zst yuzu-2adb226b26f7f4b9a2c5cd4ea056479d7b5c1527.zip |
Diffstat (limited to 'src/core/hle/service')
-rw-r--r-- | src/core/hle/service/am/applets/error.cpp | 7 | ||||
-rw-r--r-- | src/core/hle/service/am/applets/error.h | 10 | ||||
-rw-r--r-- | src/core/hle/service/am/applets/general_backend.cpp | 1 | ||||
-rw-r--r-- | src/core/hle/service/am/applets/general_backend.h | 6 | ||||
-rw-r--r-- | src/core/hle/service/am/applets/profile_select.h | 3 | ||||
-rw-r--r-- | src/core/hle/service/am/applets/software_keyboard.h | 2 | ||||
-rw-r--r-- | src/core/hle/service/am/applets/web_browser.cpp | 2 | ||||
-rw-r--r-- | src/core/hle/service/am/applets/web_browser.h | 4 |
8 files changed, 20 insertions, 15 deletions
diff --git a/src/core/hle/service/am/applets/error.cpp b/src/core/hle/service/am/applets/error.cpp index fec014f3b..04774bedc 100644 --- a/src/core/hle/service/am/applets/error.cpp +++ b/src/core/hle/service/am/applets/error.cpp @@ -2,6 +2,10 @@ // Licensed under GPLv2 or any later version // Refer to the license.txt file included. +#include <array> +#include <cstring> +#include "common/assert.h" +#include "common/logging/log.h" #include "common/string_util.h" #include "core/core.h" #include "core/frontend/applets/error.h" @@ -54,7 +58,7 @@ struct ApplicationErrorArg { }; static_assert(sizeof(ApplicationErrorArg) == 0x1014, "ApplicationErrorArg has incorrect size."); -union ErrorArguments { +union Error::ErrorArguments { ShowError error; ShowErrorRecord error_record; SystemErrorArg system_error; @@ -107,6 +111,7 @@ void Error::Initialize() { case ErrorAppletMode::ShowSystemError: CopyArgumentData(data, args->system_error); error_code = ResultCode(Decode64BitError(args->system_error.error_code_64)); + break; case ErrorAppletMode::ShowApplicationError: CopyArgumentData(data, args->application_error); error_code = ResultCode(args->application_error.error_code); diff --git a/src/core/hle/service/am/applets/error.h b/src/core/hle/service/am/applets/error.h index fcf9caef2..a3590d181 100644 --- a/src/core/hle/service/am/applets/error.h +++ b/src/core/hle/service/am/applets/error.h @@ -9,8 +9,6 @@ namespace Service::AM::Applets { -union ErrorArguments; - enum class ErrorAppletMode : u8 { ShowError = 0, ShowSystemError = 1, @@ -23,7 +21,7 @@ enum class ErrorAppletMode : u8 { class Error final : public Applet { public: - Error(const Core::Frontend::ErrorApplet& frontend); + explicit Error(const Core::Frontend::ErrorApplet& frontend); ~Error() override; void Initialize() override; @@ -36,12 +34,14 @@ public: void DisplayCompleted(); private: + union ErrorArguments; + const Core::Frontend::ErrorApplet& frontend; ResultCode error_code = RESULT_SUCCESS; - ErrorAppletMode mode; + ErrorAppletMode mode = ErrorAppletMode::ShowError; std::unique_ptr<ErrorArguments> args; - bool complete; + bool complete = false; }; } // namespace Service::AM::Applets diff --git a/src/core/hle/service/am/applets/general_backend.cpp b/src/core/hle/service/am/applets/general_backend.cpp index 18ab0718b..c591b9ac2 100644 --- a/src/core/hle/service/am/applets/general_backend.cpp +++ b/src/core/hle/service/am/applets/general_backend.cpp @@ -4,6 +4,7 @@ #include <string> +#include "common/assert.h" #include "common/hex_util.h" #include "common/logging/log.h" #include "core/core.h" diff --git a/src/core/hle/service/am/applets/general_backend.h b/src/core/hle/service/am/applets/general_backend.h index d7313e74a..2dd255d7c 100644 --- a/src/core/hle/service/am/applets/general_backend.h +++ b/src/core/hle/service/am/applets/general_backend.h @@ -15,7 +15,7 @@ enum class PhotoViewerAppletMode : u8 { class PhotoViewer final : public Applet { public: - PhotoViewer(const Core::Frontend::PhotoViewerApplet& frontend); + explicit PhotoViewer(const Core::Frontend::PhotoViewerApplet& frontend); ~PhotoViewer() override; void Initialize() override; @@ -28,8 +28,8 @@ public: private: const Core::Frontend::PhotoViewerApplet& frontend; - bool complete; - PhotoViewerAppletMode mode; + bool complete = false; + PhotoViewerAppletMode mode = PhotoViewerAppletMode::CurrentApp; }; class StubApplet final : public Applet { diff --git a/src/core/hle/service/am/applets/profile_select.h b/src/core/hle/service/am/applets/profile_select.h index cb281dd52..a2ac6cf50 100644 --- a/src/core/hle/service/am/applets/profile_select.h +++ b/src/core/hle/service/am/applets/profile_select.h @@ -7,7 +7,6 @@ #include <vector> #include "common/common_funcs.h" -#include "core/frontend/applets/software_keyboard.h" #include "core/hle/service/acc/profile_manager.h" #include "core/hle/service/am/applets/applets.h" @@ -29,7 +28,7 @@ static_assert(sizeof(UserSelectionOutput) == 0x18, "UserSelectionOutput has inco class ProfileSelect final : public Applet { public: - ProfileSelect(const Core::Frontend::ProfileSelectApplet& frontend); + explicit ProfileSelect(const Core::Frontend::ProfileSelectApplet& frontend); ~ProfileSelect() override; void Initialize() override; diff --git a/src/core/hle/service/am/applets/software_keyboard.h b/src/core/hle/service/am/applets/software_keyboard.h index e97e1cd5b..0fbc43e51 100644 --- a/src/core/hle/service/am/applets/software_keyboard.h +++ b/src/core/hle/service/am/applets/software_keyboard.h @@ -55,7 +55,7 @@ static_assert(sizeof(KeyboardConfig) == 0x3E0, "KeyboardConfig has incorrect siz class SoftwareKeyboard final : public Applet { public: - SoftwareKeyboard(const Core::Frontend::SoftwareKeyboardApplet& frontend); + explicit SoftwareKeyboard(const Core::Frontend::SoftwareKeyboardApplet& frontend); ~SoftwareKeyboard() override; void Initialize() override; diff --git a/src/core/hle/service/am/applets/web_browser.cpp b/src/core/hle/service/am/applets/web_browser.cpp index a66e23fce..7878f5136 100644 --- a/src/core/hle/service/am/applets/web_browser.cpp +++ b/src/core/hle/service/am/applets/web_browser.cpp @@ -95,7 +95,7 @@ static FileSys::VirtualFile GetManualRomFS() { return nullptr; } -WebBrowser::WebBrowser(const Core::Frontend::WebBrowserApplet& frontend) : frontend(frontend) {} +WebBrowser::WebBrowser(Core::Frontend::WebBrowserApplet& frontend) : frontend(frontend) {} WebBrowser::~WebBrowser() = default; diff --git a/src/core/hle/service/am/applets/web_browser.h b/src/core/hle/service/am/applets/web_browser.h index 894bdb35a..7e0f34c7d 100644 --- a/src/core/hle/service/am/applets/web_browser.h +++ b/src/core/hle/service/am/applets/web_browser.h @@ -12,7 +12,7 @@ namespace Service::AM::Applets { class WebBrowser final : public Applet { public: - WebBrowser(const Core::Frontend::WebBrowserApplet& frontend); + WebBrowser(Core::Frontend::WebBrowserApplet& frontend); ~WebBrowser() override; void Initialize() override; @@ -32,7 +32,7 @@ public: void Finalize(); private: - const Core::Frontend::WebBrowserApplet& frontend; + Core::Frontend::WebBrowserApplet& frontend; bool complete = false; bool unpacked = false; |