summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar David Marcec2018-09-19 23:25:00 +1000
committerGravatar David Marcec2018-09-19 23:25:00 +1000
commitcbc7ad8f6d1c122797f016eba5bbf4898fbf20d3 (patch)
tree6e02225be2f9c3abdd69392a3aa0812a2f534da4
parentMerge pull request #1348 from ogniK5377/GetImageSize (diff)
downloadyuzu-cbc7ad8f6d1c122797f016eba5bbf4898fbf20d3.tar.gz
yuzu-cbc7ad8f6d1c122797f016eba5bbf4898fbf20d3.tar.xz
yuzu-cbc7ad8f6d1c122797f016eba5bbf4898fbf20d3.zip
Fixed GetAccountId stub, Added error code for OpenDirectory and added ActivateNpadWithRevision
With these, `Nintendo Entertainment System - Nintendo Switch Online` loads
-rw-r--r--src/core/hle/service/acc/acc.cpp9
-rw-r--r--src/core/hle/service/filesystem/filesystem.cpp2
-rw-r--r--src/core/hle/service/hid/hid.cpp8
3 files changed, 12 insertions, 7 deletions
diff --git a/src/core/hle/service/acc/acc.cpp b/src/core/hle/service/acc/acc.cpp
index 4d4eb542e..e61748ca3 100644
--- a/src/core/hle/service/acc/acc.cpp
+++ b/src/core/hle/service/acc/acc.cpp
@@ -130,11 +130,10 @@ private:
130 130
131 void GetAccountId(Kernel::HLERequestContext& ctx) { 131 void GetAccountId(Kernel::HLERequestContext& ctx) {
132 LOG_WARNING(Service_ACC, "(STUBBED) called"); 132 LOG_WARNING(Service_ACC, "(STUBBED) called");
133 // TODO(Subv): Find out what this actually does and implement it. Stub it as an error for 133 // Should return a nintendo account ID
134 // now since we do not implement NNID. Returning a bogus id here will cause games to send 134 IPC::ResponseBuilder rb{ctx, 4};
135 // invalid IPC requests after ListOpenUsers is called. 135 rb.Push(RESULT_SUCCESS);
136 IPC::ResponseBuilder rb{ctx, 2}; 136 rb.PushRaw<u64>(1);
137 rb.Push(ResultCode(-1));
138 } 137 }
139}; 138};
140 139
diff --git a/src/core/hle/service/filesystem/filesystem.cpp b/src/core/hle/service/filesystem/filesystem.cpp
index 5c4971724..d349ee686 100644
--- a/src/core/hle/service/filesystem/filesystem.cpp
+++ b/src/core/hle/service/filesystem/filesystem.cpp
@@ -197,7 +197,7 @@ ResultVal<FileSys::VirtualDir> VfsDirectoryServiceWrapper::OpenDirectory(const s
197 auto dir = GetDirectoryRelativeWrapped(backing, path); 197 auto dir = GetDirectoryRelativeWrapped(backing, path);
198 if (dir == nullptr) { 198 if (dir == nullptr) {
199 // TODO(DarkLordZach): Find a better error code for this 199 // TODO(DarkLordZach): Find a better error code for this
200 return ResultCode(-1); 200 return FileSys::ERROR_PATH_NOT_FOUND;
201 } 201 }
202 return MakeResult(dir); 202 return MakeResult(dir);
203} 203}
diff --git a/src/core/hle/service/hid/hid.cpp b/src/core/hle/service/hid/hid.cpp
index 256c49bfc..7c6b0a4e6 100644
--- a/src/core/hle/service/hid/hid.cpp
+++ b/src/core/hle/service/hid/hid.cpp
@@ -338,7 +338,7 @@ public:
338 {106, &Hid::AcquireNpadStyleSetUpdateEventHandle, "AcquireNpadStyleSetUpdateEventHandle"}, 338 {106, &Hid::AcquireNpadStyleSetUpdateEventHandle, "AcquireNpadStyleSetUpdateEventHandle"},
339 {107, &Hid::DisconnectNpad, "DisconnectNpad"}, 339 {107, &Hid::DisconnectNpad, "DisconnectNpad"},
340 {108, &Hid::GetPlayerLedPattern, "GetPlayerLedPattern"}, 340 {108, &Hid::GetPlayerLedPattern, "GetPlayerLedPattern"},
341 {109, nullptr, "ActivateNpadWithRevision"}, 341 {109, &Hid::ActivateNpadWithRevision, "ActivateNpadWithRevision"},
342 {120, &Hid::SetNpadJoyHoldType, "SetNpadJoyHoldType"}, 342 {120, &Hid::SetNpadJoyHoldType, "SetNpadJoyHoldType"},
343 {121, &Hid::GetNpadJoyHoldType, "GetNpadJoyHoldType"}, 343 {121, &Hid::GetNpadJoyHoldType, "GetNpadJoyHoldType"},
344 {122, &Hid::SetNpadJoyAssignmentModeSingleByDefault, "SetNpadJoyAssignmentModeSingleByDefault"}, 344 {122, &Hid::SetNpadJoyAssignmentModeSingleByDefault, "SetNpadJoyAssignmentModeSingleByDefault"},
@@ -603,6 +603,12 @@ private:
603 rb.Push(RESULT_SUCCESS); 603 rb.Push(RESULT_SUCCESS);
604 LOG_WARNING(Service_HID, "(STUBBED) called"); 604 LOG_WARNING(Service_HID, "(STUBBED) called");
605 } 605 }
606
607 void ActivateNpadWithRevision(Kernel::HLERequestContext& ctx) {
608 IPC::ResponseBuilder rb{ctx, 2};
609 rb.Push(RESULT_SUCCESS);
610 LOG_WARNING(Service_HID, "(STUBBED) called");
611 }
606}; 612};
607 613
608class HidDbg final : public ServiceFramework<HidDbg> { 614class HidDbg final : public ServiceFramework<HidDbg> {