summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar liamwhite2024-02-20 21:19:35 -0500
committerGravatar GitHub2024-02-20 21:19:35 -0500
commit7b5bdd076df136e6e057bce1c1e7702e0cd131d9 (patch)
treedafc468071ca5642f92441908cefefb495be30af /src
parentMerge pull request #10529 from liamwhite/critical-spacing (diff)
parentns: fix alignment of uid type (diff)
downloadyuzu-7b5bdd076df136e6e057bce1c1e7702e0cd131d9.tar.gz
yuzu-7b5bdd076df136e6e057bce1c1e7702e0cd131d9.tar.xz
yuzu-7b5bdd076df136e6e057bce1c1e7702e0cd131d9.zip
Merge pull request #13095 from liamwhite/ns-oops
ns: fix alignment of uid type
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/service/ns/application_manager_interface.cpp6
-rw-r--r--src/core/hle/service/ns/application_manager_interface.h2
-rw-r--r--src/core/hle/service/ns/ns_types.h5
-rw-r--r--src/core/hle/service/ns/query_service.cpp5
-rw-r--r--src/core/hle/service/ns/query_service.h4
5 files changed, 13 insertions, 9 deletions
diff --git a/src/core/hle/service/ns/application_manager_interface.cpp b/src/core/hle/service/ns/application_manager_interface.cpp
index 2e3a44c0d..7a91727f9 100644
--- a/src/core/hle/service/ns/application_manager_interface.cpp
+++ b/src/core/hle/service/ns/application_manager_interface.cpp
@@ -436,14 +436,14 @@ Result IApplicationManagerInterface::GetApplicationViewWithPromotionInfo(
436 436
437Result IApplicationManagerInterface::GetApplicationRightsOnClient( 437Result IApplicationManagerInterface::GetApplicationRightsOnClient(
438 OutArray<ApplicationRightsOnClient, BufferAttr_HipcMapAlias> out_rights, Out<u32> out_count, 438 OutArray<ApplicationRightsOnClient, BufferAttr_HipcMapAlias> out_rights, Out<u32> out_count,
439 Common::UUID account_id, u32 flags, u64 application_id) { 439 u32 flags, u64 application_id, Uid account_id) {
440 LOG_WARNING(Service_NS, "(STUBBED) called, flags={}, application_id={:016X}, account_id={}", 440 LOG_WARNING(Service_NS, "(STUBBED) called, flags={}, application_id={:016X}, account_id={}",
441 flags, application_id, account_id.FormattedString()); 441 flags, application_id, account_id.uuid.FormattedString());
442 442
443 if (!out_rights.empty()) { 443 if (!out_rights.empty()) {
444 ApplicationRightsOnClient rights{}; 444 ApplicationRightsOnClient rights{};
445 rights.application_id = application_id; 445 rights.application_id = application_id;
446 rights.uid = account_id; 446 rights.uid = account_id.uuid;
447 rights.flags = 0; 447 rights.flags = 0;
448 rights.flags2 = 0; 448 rights.flags2 = 0;
449 449
diff --git a/src/core/hle/service/ns/application_manager_interface.h b/src/core/hle/service/ns/application_manager_interface.h
index 350ec37ce..f33d269b3 100644
--- a/src/core/hle/service/ns/application_manager_interface.h
+++ b/src/core/hle/service/ns/application_manager_interface.h
@@ -37,7 +37,7 @@ public:
37 InArray<u64, BufferAttr_HipcMapAlias> application_ids); 37 InArray<u64, BufferAttr_HipcMapAlias> application_ids);
38 Result GetApplicationRightsOnClient( 38 Result GetApplicationRightsOnClient(
39 OutArray<ApplicationRightsOnClient, BufferAttr_HipcMapAlias> out_rights, Out<u32> out_count, 39 OutArray<ApplicationRightsOnClient, BufferAttr_HipcMapAlias> out_rights, Out<u32> out_count,
40 Common::UUID account_id, u32 flags, u64 application_id); 40 u32 flags, u64 application_id, Uid account_id);
41 Result CheckSdCardMountStatus(); 41 Result CheckSdCardMountStatus();
42 Result GetSdCardMountStatusChangedEvent(OutCopyHandle<Kernel::KReadableEvent> out_event); 42 Result GetSdCardMountStatusChangedEvent(OutCopyHandle<Kernel::KReadableEvent> out_event);
43 Result GetFreeSpaceSize(Out<s64> out_free_space_size, FileSys::StorageId storage_id); 43 Result GetFreeSpaceSize(Out<s64> out_free_space_size, FileSys::StorageId storage_id);
diff --git a/src/core/hle/service/ns/ns_types.h b/src/core/hle/service/ns/ns_types.h
index 38421b0f4..2dd664c4e 100644
--- a/src/core/hle/service/ns/ns_types.h
+++ b/src/core/hle/service/ns/ns_types.h
@@ -108,4 +108,9 @@ struct ContentPath {
108}; 108};
109static_assert(sizeof(ContentPath) == 0x10, "ContentPath has incorrect size."); 109static_assert(sizeof(ContentPath) == 0x10, "ContentPath has incorrect size.");
110 110
111struct Uid {
112 alignas(8) Common::UUID uuid;
113};
114static_assert(sizeof(Uid) == 0x10, "Uid has incorrect size.");
115
111} // namespace Service::NS 116} // namespace Service::NS
diff --git a/src/core/hle/service/ns/query_service.cpp b/src/core/hle/service/ns/query_service.cpp
index 946b7fa23..138400541 100644
--- a/src/core/hle/service/ns/query_service.cpp
+++ b/src/core/hle/service/ns/query_service.cpp
@@ -41,8 +41,7 @@ IQueryService::IQueryService(Core::System& system_) : ServiceFramework{system_,
41IQueryService::~IQueryService() = default; 41IQueryService::~IQueryService() = default;
42 42
43Result IQueryService::QueryPlayStatisticsByApplicationIdAndUserAccountId( 43Result IQueryService::QueryPlayStatisticsByApplicationIdAndUserAccountId(
44 Out<PlayStatistics> out_play_statistics, bool unknown, Common::UUID account_id, 44 Out<PlayStatistics> out_play_statistics, bool unknown, u64 application_id, Uid account_id) {
45 u64 application_id) {
46 // TODO(German77): Read statistics of the game 45 // TODO(German77): Read statistics of the game
47 *out_play_statistics = { 46 *out_play_statistics = {
48 .application_id = application_id, 47 .application_id = application_id,
@@ -50,7 +49,7 @@ Result IQueryService::QueryPlayStatisticsByApplicationIdAndUserAccountId(
50 }; 49 };
51 50
52 LOG_WARNING(Service_NS, "(STUBBED) called. unknown={}. application_id={:016X}, account_id={}", 51 LOG_WARNING(Service_NS, "(STUBBED) called. unknown={}. application_id={:016X}, account_id={}",
53 unknown, application_id, account_id.FormattedString()); 52 unknown, application_id, account_id.uuid.FormattedString());
54 R_SUCCEED(); 53 R_SUCCEED();
55} 54}
56 55
diff --git a/src/core/hle/service/ns/query_service.h b/src/core/hle/service/ns/query_service.h
index 6cdbfa277..c4c82b752 100644
--- a/src/core/hle/service/ns/query_service.h
+++ b/src/core/hle/service/ns/query_service.h
@@ -5,6 +5,7 @@
5 5
6#include "common/uuid.h" 6#include "common/uuid.h"
7#include "core/hle/service/cmif_types.h" 7#include "core/hle/service/cmif_types.h"
8#include "core/hle/service/ns/ns_types.h"
8#include "core/hle/service/service.h" 9#include "core/hle/service/service.h"
9 10
10namespace Service::NS { 11namespace Service::NS {
@@ -29,8 +30,7 @@ public:
29 30
30private: 31private:
31 Result QueryPlayStatisticsByApplicationIdAndUserAccountId( 32 Result QueryPlayStatisticsByApplicationIdAndUserAccountId(
32 Out<PlayStatistics> out_play_statistics, bool unknown, Common::UUID account_id, 33 Out<PlayStatistics> out_play_statistics, bool unknown, u64 application_id, Uid account_id);
33 u64 application_id);
34}; 34};
35 35
36} // namespace Service::NS 36} // namespace Service::NS