summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/am
diff options
context:
space:
mode:
authorliamwhite <liamwhite@users.noreply.github.com>2023-03-08 15:16:27 +0100
committerGitHub <noreply@github.com>2023-03-08 15:16:27 +0100
commitf3f57f90fed6d1c3b478c9fceb91a54579b4947d (patch)
tree3280b90f3b54b6f8f3fca804cab04699897faa3f /src/core/hle/service/am
parentMerge pull request #9904 from liamwhite/ws (diff)
parenthle: rename legacy errors to Results (diff)
downloadyuzu-f3f57f90fed6d1c3b478c9fceb91a54579b4947d.tar
yuzu-f3f57f90fed6d1c3b478c9fceb91a54579b4947d.tar.gz
yuzu-f3f57f90fed6d1c3b478c9fceb91a54579b4947d.tar.bz2
yuzu-f3f57f90fed6d1c3b478c9fceb91a54579b4947d.tar.lz
yuzu-f3f57f90fed6d1c3b478c9fceb91a54579b4947d.tar.xz
yuzu-f3f57f90fed6d1c3b478c9fceb91a54579b4947d.tar.zst
yuzu-f3f57f90fed6d1c3b478c9fceb91a54579b4947d.zip
Diffstat (limited to 'src/core/hle/service/am')
-rw-r--r--src/core/hle/service/am/am.cpp20
-rw-r--r--src/core/hle/service/am/applets/applet_controller.cpp7
-rw-r--r--src/core/hle/service/am/applets/applet_profile_select.cpp7
3 files changed, 16 insertions, 18 deletions
diff --git a/src/core/hle/service/am/am.cpp b/src/core/hle/service/am/am.cpp
index f74c7b550..f17df5124 100644
--- a/src/core/hle/service/am/am.cpp
+++ b/src/core/hle/service/am/am.cpp
@@ -39,9 +39,9 @@
namespace Service::AM {
-constexpr Result ERR_NO_DATA_IN_CHANNEL{ErrorModule::AM, 2};
-constexpr Result ERR_NO_MESSAGES{ErrorModule::AM, 3};
-constexpr Result ERR_SIZE_OUT_OF_BOUNDS{ErrorModule::AM, 503};
+constexpr Result ResultNoDataInChannel{ErrorModule::AM, 2};
+constexpr Result ResultNoMessages{ErrorModule::AM, 3};
+constexpr Result ResultInvalidOffset{ErrorModule::AM, 503};
enum class LaunchParameterKind : u32 {
ApplicationSpecific = 1,
@@ -758,7 +758,7 @@ void ICommonStateGetter::ReceiveMessage(HLERequestContext& ctx) {
if (message == AppletMessageQueue::AppletMessage::None) {
LOG_ERROR(Service_AM, "Message queue is empty");
- rb.Push(ERR_NO_MESSAGES);
+ rb.Push(AM::ResultNoMessages);
rb.PushEnum<AppletMessageQueue::AppletMessage>(message);
return;
}
@@ -1028,7 +1028,7 @@ private:
LOG_DEBUG(Service_AM,
"storage is a nullptr. There is no data in the current normal channel");
IPC::ResponseBuilder rb{ctx, 2};
- rb.Push(ERR_NO_DATA_IN_CHANNEL);
+ rb.Push(AM::ResultNoDataInChannel);
return;
}
@@ -1059,7 +1059,7 @@ private:
LOG_DEBUG(Service_AM,
"storage is a nullptr. There is no data in the current interactive channel");
IPC::ResponseBuilder rb{ctx, 2};
- rb.Push(ERR_NO_DATA_IN_CHANNEL);
+ rb.Push(AM::ResultNoDataInChannel);
return;
}
@@ -1138,7 +1138,7 @@ void IStorageAccessor::Write(HLERequestContext& ctx) {
backing.GetSize(), size, offset);
IPC::ResponseBuilder rb{ctx, 2};
- rb.Push(ERR_SIZE_OUT_OF_BOUNDS);
+ rb.Push(AM::ResultInvalidOffset);
return;
}
@@ -1161,7 +1161,7 @@ void IStorageAccessor::Read(HLERequestContext& ctx) {
backing.GetSize(), size, offset);
IPC::ResponseBuilder rb{ctx, 2};
- rb.Push(ERR_SIZE_OUT_OF_BOUNDS);
+ rb.Push(AM::ResultInvalidOffset);
return;
}
@@ -1502,7 +1502,7 @@ void IApplicationFunctions::PopLaunchParameter(HLERequestContext& ctx) {
LOG_ERROR(Service_AM, "Attempted to load launch parameter but none was found!");
IPC::ResponseBuilder rb{ctx, 2};
- rb.Push(ERR_NO_DATA_IN_CHANNEL);
+ rb.Push(AM::ResultNoDataInChannel);
}
void IApplicationFunctions::CreateApplicationAndRequestToStartForQuest(HLERequestContext& ctx) {
@@ -1799,7 +1799,7 @@ void IApplicationFunctions::TryPopFromFriendInvitationStorageChannel(HLERequestC
LOG_WARNING(Service_AM, "(STUBBED) called");
IPC::ResponseBuilder rb{ctx, 2};
- rb.Push(ERR_NO_DATA_IN_CHANNEL);
+ rb.Push(AM::ResultNoDataInChannel);
}
void IApplicationFunctions::GetNotificationStorageChannelEvent(HLERequestContext& ctx) {
diff --git a/src/core/hle/service/am/applets/applet_controller.cpp b/src/core/hle/service/am/applets/applet_controller.cpp
index b418031de..58484519b 100644
--- a/src/core/hle/service/am/applets/applet_controller.cpp
+++ b/src/core/hle/service/am/applets/applet_controller.cpp
@@ -19,10 +19,9 @@
namespace Service::AM::Applets {
-// This error code (0x183ACA) is thrown when the applet fails to initialize.
-[[maybe_unused]] constexpr Result ERR_CONTROLLER_APPLET_3101{ErrorModule::HID, 3101};
-// This error code (0x183CCA) is thrown when the u32 result in ControllerSupportResultInfo is 2.
-[[maybe_unused]] constexpr Result ERR_CONTROLLER_APPLET_3102{ErrorModule::HID, 3102};
+[[maybe_unused]] constexpr Result ResultControllerSupportCanceled{ErrorModule::HID, 3101};
+[[maybe_unused]] constexpr Result ResultControllerSupportNotSupportedNpadStyle{ErrorModule::HID,
+ 3102};
static Core::Frontend::ControllerParameters ConvertToFrontendParameters(
ControllerSupportArgPrivate private_arg, ControllerSupportArgHeader header, bool enable_text,
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 c738db028..1d69f5447 100644
--- a/src/core/hle/service/am/applets/applet_profile_select.cpp
+++ b/src/core/hle/service/am/applets/applet_profile_select.cpp
@@ -7,13 +7,12 @@
#include "common/string_util.h"
#include "core/core.h"
#include "core/frontend/applets/profile_select.h"
+#include "core/hle/service/acc/errors.h"
#include "core/hle/service/am/am.h"
#include "core/hle/service/am/applets/applet_profile_select.h"
namespace Service::AM::Applets {
-constexpr Result ERR_USER_CANCELLED_SELECTION{ErrorModule::Account, 1};
-
ProfileSelect::ProfileSelect(Core::System& system_, LibraryAppletMode applet_mode_,
const Core::Frontend::ProfileSelectApplet& frontend_)
: Applet{system_, applet_mode_}, frontend{frontend_}, system{system_} {}
@@ -63,8 +62,8 @@ void ProfileSelect::SelectionComplete(std::optional<Common::UUID> uuid) {
output.result = 0;
output.uuid_selected = *uuid;
} else {
- status = ERR_USER_CANCELLED_SELECTION;
- output.result = ERR_USER_CANCELLED_SELECTION.raw;
+ status = Account::ResultCancelledByUser;
+ output.result = Account::ResultCancelledByUser.raw;
output.uuid_selected = Common::InvalidUUID;
}