diff options
Diffstat (limited to 'src/core')
21 files changed, 121 insertions, 125 deletions
diff --git a/src/core/frontend/applets/profile_select.cpp b/src/core/frontend/applets/profile_select.cpp index a7ff2ccf9..4c58c310f 100644 --- a/src/core/frontend/applets/profile_select.cpp +++ b/src/core/frontend/applets/profile_select.cpp | |||
| @@ -11,9 +11,9 @@ namespace Core::Frontend { | |||
| 11 | ProfileSelectApplet::~ProfileSelectApplet() = default; | 11 | ProfileSelectApplet::~ProfileSelectApplet() = default; |
| 12 | 12 | ||
| 13 | void DefaultProfileSelectApplet::SelectProfile( | 13 | void DefaultProfileSelectApplet::SelectProfile( |
| 14 | std::function<void(std::optional<Common::NewUUID>)> callback) const { | 14 | std::function<void(std::optional<Common::UUID>)> callback) const { |
| 15 | Service::Account::ProfileManager manager; | 15 | Service::Account::ProfileManager manager; |
| 16 | callback(manager.GetUser(Settings::values.current_user.GetValue()).value_or(Common::NewUUID{})); | 16 | callback(manager.GetUser(Settings::values.current_user.GetValue()).value_or(Common::UUID{})); |
| 17 | LOG_INFO(Service_ACC, "called, selecting current user instead of prompting..."); | 17 | LOG_INFO(Service_ACC, "called, selecting current user instead of prompting..."); |
| 18 | } | 18 | } |
| 19 | 19 | ||
diff --git a/src/core/frontend/applets/profile_select.h b/src/core/frontend/applets/profile_select.h index 5b2346e72..3506b9885 100644 --- a/src/core/frontend/applets/profile_select.h +++ b/src/core/frontend/applets/profile_select.h | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | 6 | ||
| 7 | #include <functional> | 7 | #include <functional> |
| 8 | #include <optional> | 8 | #include <optional> |
| 9 | #include "common/new_uuid.h" | 9 | #include "common/uuid.h" |
| 10 | 10 | ||
| 11 | namespace Core::Frontend { | 11 | namespace Core::Frontend { |
| 12 | 12 | ||
| @@ -14,13 +14,12 @@ class ProfileSelectApplet { | |||
| 14 | public: | 14 | public: |
| 15 | virtual ~ProfileSelectApplet(); | 15 | virtual ~ProfileSelectApplet(); |
| 16 | 16 | ||
| 17 | virtual void SelectProfile( | 17 | virtual void SelectProfile(std::function<void(std::optional<Common::UUID>)> callback) const = 0; |
| 18 | std::function<void(std::optional<Common::NewUUID>)> callback) const = 0; | ||
| 19 | }; | 18 | }; |
| 20 | 19 | ||
| 21 | class DefaultProfileSelectApplet final : public ProfileSelectApplet { | 20 | class DefaultProfileSelectApplet final : public ProfileSelectApplet { |
| 22 | public: | 21 | public: |
| 23 | void SelectProfile(std::function<void(std::optional<Common::NewUUID>)> callback) const override; | 22 | void SelectProfile(std::function<void(std::optional<Common::UUID>)> callback) const override; |
| 24 | }; | 23 | }; |
| 25 | 24 | ||
| 26 | } // namespace Core::Frontend | 25 | } // namespace Core::Frontend |
diff --git a/src/core/hid/emulated_controller.cpp b/src/core/hid/emulated_controller.cpp index 44e9f22b9..2bee173b3 100644 --- a/src/core/hid/emulated_controller.cpp +++ b/src/core/hid/emulated_controller.cpp | |||
| @@ -204,7 +204,7 @@ void EmulatedController::ReloadInput() { | |||
| 204 | if (!button_devices[index]) { | 204 | if (!button_devices[index]) { |
| 205 | continue; | 205 | continue; |
| 206 | } | 206 | } |
| 207 | const auto uuid = Common::NewUUID{button_params[index].Get("guid", "")}; | 207 | const auto uuid = Common::UUID{button_params[index].Get("guid", "")}; |
| 208 | button_devices[index]->SetCallback({ | 208 | button_devices[index]->SetCallback({ |
| 209 | .on_change = | 209 | .on_change = |
| 210 | [this, index, uuid](const Common::Input::CallbackStatus& callback) { | 210 | [this, index, uuid](const Common::Input::CallbackStatus& callback) { |
| @@ -218,7 +218,7 @@ void EmulatedController::ReloadInput() { | |||
| 218 | if (!stick_devices[index]) { | 218 | if (!stick_devices[index]) { |
| 219 | continue; | 219 | continue; |
| 220 | } | 220 | } |
| 221 | const auto uuid = Common::NewUUID{stick_params[index].Get("guid", "")}; | 221 | const auto uuid = Common::UUID{stick_params[index].Get("guid", "")}; |
| 222 | stick_devices[index]->SetCallback({ | 222 | stick_devices[index]->SetCallback({ |
| 223 | .on_change = | 223 | .on_change = |
| 224 | [this, index, uuid](const Common::Input::CallbackStatus& callback) { | 224 | [this, index, uuid](const Common::Input::CallbackStatus& callback) { |
| @@ -232,7 +232,7 @@ void EmulatedController::ReloadInput() { | |||
| 232 | if (!trigger_devices[index]) { | 232 | if (!trigger_devices[index]) { |
| 233 | continue; | 233 | continue; |
| 234 | } | 234 | } |
| 235 | const auto uuid = Common::NewUUID{trigger_params[index].Get("guid", "")}; | 235 | const auto uuid = Common::UUID{trigger_params[index].Get("guid", "")}; |
| 236 | trigger_devices[index]->SetCallback({ | 236 | trigger_devices[index]->SetCallback({ |
| 237 | .on_change = | 237 | .on_change = |
| 238 | [this, index, uuid](const Common::Input::CallbackStatus& callback) { | 238 | [this, index, uuid](const Common::Input::CallbackStatus& callback) { |
| @@ -269,7 +269,7 @@ void EmulatedController::ReloadInput() { | |||
| 269 | } | 269 | } |
| 270 | 270 | ||
| 271 | // Use a common UUID for TAS | 271 | // Use a common UUID for TAS |
| 272 | static constexpr Common::NewUUID TAS_UUID = Common::NewUUID{ | 272 | static constexpr Common::UUID TAS_UUID = Common::UUID{ |
| 273 | {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7, 0xA5, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}}; | 273 | {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7, 0xA5, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}}; |
| 274 | 274 | ||
| 275 | // Register TAS devices. No need to force update | 275 | // Register TAS devices. No need to force update |
| @@ -490,7 +490,7 @@ void EmulatedController::SetMotionParam(std::size_t index, Common::ParamPackage | |||
| 490 | } | 490 | } |
| 491 | 491 | ||
| 492 | void EmulatedController::SetButton(const Common::Input::CallbackStatus& callback, std::size_t index, | 492 | void EmulatedController::SetButton(const Common::Input::CallbackStatus& callback, std::size_t index, |
| 493 | Common::NewUUID uuid) { | 493 | Common::UUID uuid) { |
| 494 | if (index >= controller.button_values.size()) { | 494 | if (index >= controller.button_values.size()) { |
| 495 | return; | 495 | return; |
| 496 | } | 496 | } |
| @@ -639,7 +639,7 @@ void EmulatedController::SetButton(const Common::Input::CallbackStatus& callback | |||
| 639 | } | 639 | } |
| 640 | 640 | ||
| 641 | void EmulatedController::SetStick(const Common::Input::CallbackStatus& callback, std::size_t index, | 641 | void EmulatedController::SetStick(const Common::Input::CallbackStatus& callback, std::size_t index, |
| 642 | Common::NewUUID uuid) { | 642 | Common::UUID uuid) { |
| 643 | if (index >= controller.stick_values.size()) { | 643 | if (index >= controller.stick_values.size()) { |
| 644 | return; | 644 | return; |
| 645 | } | 645 | } |
| @@ -689,7 +689,7 @@ void EmulatedController::SetStick(const Common::Input::CallbackStatus& callback, | |||
| 689 | } | 689 | } |
| 690 | 690 | ||
| 691 | void EmulatedController::SetTrigger(const Common::Input::CallbackStatus& callback, | 691 | void EmulatedController::SetTrigger(const Common::Input::CallbackStatus& callback, |
| 692 | std::size_t index, Common::NewUUID uuid) { | 692 | std::size_t index, Common::UUID uuid) { |
| 693 | if (index >= controller.trigger_values.size()) { | 693 | if (index >= controller.trigger_values.size()) { |
| 694 | return; | 694 | return; |
| 695 | } | 695 | } |
diff --git a/src/core/hid/emulated_controller.h b/src/core/hid/emulated_controller.h index ed61e9522..d8642c5b3 100644 --- a/src/core/hid/emulated_controller.h +++ b/src/core/hid/emulated_controller.h | |||
| @@ -354,7 +354,7 @@ private: | |||
| 354 | * @param index Button ID of the to be updated | 354 | * @param index Button ID of the to be updated |
| 355 | */ | 355 | */ |
| 356 | void SetButton(const Common::Input::CallbackStatus& callback, std::size_t index, | 356 | void SetButton(const Common::Input::CallbackStatus& callback, std::size_t index, |
| 357 | Common::NewUUID uuid); | 357 | Common::UUID uuid); |
| 358 | 358 | ||
| 359 | /** | 359 | /** |
| 360 | * Updates the analog stick status of the controller | 360 | * Updates the analog stick status of the controller |
| @@ -362,7 +362,7 @@ private: | |||
| 362 | * @param index stick ID of the to be updated | 362 | * @param index stick ID of the to be updated |
| 363 | */ | 363 | */ |
| 364 | void SetStick(const Common::Input::CallbackStatus& callback, std::size_t index, | 364 | void SetStick(const Common::Input::CallbackStatus& callback, std::size_t index, |
| 365 | Common::NewUUID uuid); | 365 | Common::UUID uuid); |
| 366 | 366 | ||
| 367 | /** | 367 | /** |
| 368 | * Updates the trigger status of the controller | 368 | * Updates the trigger status of the controller |
| @@ -370,7 +370,7 @@ private: | |||
| 370 | * @param index trigger ID of the to be updated | 370 | * @param index trigger ID of the to be updated |
| 371 | */ | 371 | */ |
| 372 | void SetTrigger(const Common::Input::CallbackStatus& callback, std::size_t index, | 372 | void SetTrigger(const Common::Input::CallbackStatus& callback, std::size_t index, |
| 373 | Common::NewUUID uuid); | 373 | Common::UUID uuid); |
| 374 | 374 | ||
| 375 | /** | 375 | /** |
| 376 | * Updates the motion status of the controller | 376 | * Updates the motion status of the controller |
diff --git a/src/core/hid/hid_types.h b/src/core/hid/hid_types.h index a4ccdf11c..778b328b9 100644 --- a/src/core/hid/hid_types.h +++ b/src/core/hid/hid_types.h | |||
| @@ -7,8 +7,8 @@ | |||
| 7 | #include "common/bit_field.h" | 7 | #include "common/bit_field.h" |
| 8 | #include "common/common_funcs.h" | 8 | #include "common/common_funcs.h" |
| 9 | #include "common/common_types.h" | 9 | #include "common/common_types.h" |
| 10 | #include "common/new_uuid.h" | ||
| 11 | #include "common/point.h" | 10 | #include "common/point.h" |
| 11 | #include "common/uuid.h" | ||
| 12 | 12 | ||
| 13 | namespace Core::HID { | 13 | namespace Core::HID { |
| 14 | 14 | ||
diff --git a/src/core/hle/service/acc/acc.cpp b/src/core/hle/service/acc/acc.cpp index 6abb7dbc4..e34ef5a78 100644 --- a/src/core/hle/service/acc/acc.cpp +++ b/src/core/hle/service/acc/acc.cpp | |||
| @@ -39,7 +39,7 @@ constexpr ResultCode ERR_FAILED_SAVE_DATA{ErrorModule::Account, 100}; | |||
| 39 | // Thumbnails are hard coded to be at least this size | 39 | // Thumbnails are hard coded to be at least this size |
| 40 | constexpr std::size_t THUMBNAIL_SIZE = 0x24000; | 40 | constexpr std::size_t THUMBNAIL_SIZE = 0x24000; |
| 41 | 41 | ||
| 42 | static std::filesystem::path GetImagePath(const Common::NewUUID& uuid) { | 42 | static std::filesystem::path GetImagePath(const Common::UUID& uuid) { |
| 43 | return Common::FS::GetYuzuPath(Common::FS::YuzuPath::NANDDir) / | 43 | return Common::FS::GetYuzuPath(Common::FS::YuzuPath::NANDDir) / |
| 44 | fmt::format("system/save/8000000000000010/su/avators/{}.jpg", uuid.FormattedString()); | 44 | fmt::format("system/save/8000000000000010/su/avators/{}.jpg", uuid.FormattedString()); |
| 45 | } | 45 | } |
| @@ -51,7 +51,7 @@ static constexpr u32 SanitizeJPEGSize(std::size_t size) { | |||
| 51 | 51 | ||
| 52 | class IManagerForSystemService final : public ServiceFramework<IManagerForSystemService> { | 52 | class IManagerForSystemService final : public ServiceFramework<IManagerForSystemService> { |
| 53 | public: | 53 | public: |
| 54 | explicit IManagerForSystemService(Core::System& system_, Common::NewUUID) | 54 | explicit IManagerForSystemService(Core::System& system_, Common::UUID) |
| 55 | : ServiceFramework{system_, "IManagerForSystemService"} { | 55 | : ServiceFramework{system_, "IManagerForSystemService"} { |
| 56 | // clang-format off | 56 | // clang-format off |
| 57 | static const FunctionInfo functions[] = { | 57 | static const FunctionInfo functions[] = { |
| @@ -87,7 +87,7 @@ public: | |||
| 87 | // 3.0.0+ | 87 | // 3.0.0+ |
| 88 | class IFloatingRegistrationRequest final : public ServiceFramework<IFloatingRegistrationRequest> { | 88 | class IFloatingRegistrationRequest final : public ServiceFramework<IFloatingRegistrationRequest> { |
| 89 | public: | 89 | public: |
| 90 | explicit IFloatingRegistrationRequest(Core::System& system_, Common::NewUUID) | 90 | explicit IFloatingRegistrationRequest(Core::System& system_, Common::UUID) |
| 91 | : ServiceFramework{system_, "IFloatingRegistrationRequest"} { | 91 | : ServiceFramework{system_, "IFloatingRegistrationRequest"} { |
| 92 | // clang-format off | 92 | // clang-format off |
| 93 | static const FunctionInfo functions[] = { | 93 | static const FunctionInfo functions[] = { |
| @@ -112,7 +112,7 @@ public: | |||
| 112 | 112 | ||
| 113 | class IAdministrator final : public ServiceFramework<IAdministrator> { | 113 | class IAdministrator final : public ServiceFramework<IAdministrator> { |
| 114 | public: | 114 | public: |
| 115 | explicit IAdministrator(Core::System& system_, Common::NewUUID) | 115 | explicit IAdministrator(Core::System& system_, Common::UUID) |
| 116 | : ServiceFramework{system_, "IAdministrator"} { | 116 | : ServiceFramework{system_, "IAdministrator"} { |
| 117 | // clang-format off | 117 | // clang-format off |
| 118 | static const FunctionInfo functions[] = { | 118 | static const FunctionInfo functions[] = { |
| @@ -170,7 +170,7 @@ public: | |||
| 170 | 170 | ||
| 171 | class IAuthorizationRequest final : public ServiceFramework<IAuthorizationRequest> { | 171 | class IAuthorizationRequest final : public ServiceFramework<IAuthorizationRequest> { |
| 172 | public: | 172 | public: |
| 173 | explicit IAuthorizationRequest(Core::System& system_, Common::NewUUID) | 173 | explicit IAuthorizationRequest(Core::System& system_, Common::UUID) |
| 174 | : ServiceFramework{system_, "IAuthorizationRequest"} { | 174 | : ServiceFramework{system_, "IAuthorizationRequest"} { |
| 175 | // clang-format off | 175 | // clang-format off |
| 176 | static const FunctionInfo functions[] = { | 176 | static const FunctionInfo functions[] = { |
| @@ -189,7 +189,7 @@ public: | |||
| 189 | 189 | ||
| 190 | class IOAuthProcedure final : public ServiceFramework<IOAuthProcedure> { | 190 | class IOAuthProcedure final : public ServiceFramework<IOAuthProcedure> { |
| 191 | public: | 191 | public: |
| 192 | explicit IOAuthProcedure(Core::System& system_, Common::NewUUID) | 192 | explicit IOAuthProcedure(Core::System& system_, Common::UUID) |
| 193 | : ServiceFramework{system_, "IOAuthProcedure"} { | 193 | : ServiceFramework{system_, "IOAuthProcedure"} { |
| 194 | // clang-format off | 194 | // clang-format off |
| 195 | static const FunctionInfo functions[] = { | 195 | static const FunctionInfo functions[] = { |
| @@ -208,7 +208,7 @@ public: | |||
| 208 | // 3.0.0+ | 208 | // 3.0.0+ |
| 209 | class IOAuthProcedureForExternalNsa final : public ServiceFramework<IOAuthProcedureForExternalNsa> { | 209 | class IOAuthProcedureForExternalNsa final : public ServiceFramework<IOAuthProcedureForExternalNsa> { |
| 210 | public: | 210 | public: |
| 211 | explicit IOAuthProcedureForExternalNsa(Core::System& system_, Common::NewUUID) | 211 | explicit IOAuthProcedureForExternalNsa(Core::System& system_, Common::UUID) |
| 212 | : ServiceFramework{system_, "IOAuthProcedureForExternalNsa"} { | 212 | : ServiceFramework{system_, "IOAuthProcedureForExternalNsa"} { |
| 213 | // clang-format off | 213 | // clang-format off |
| 214 | static const FunctionInfo functions[] = { | 214 | static const FunctionInfo functions[] = { |
| @@ -231,7 +231,7 @@ public: | |||
| 231 | class IOAuthProcedureForNintendoAccountLinkage final | 231 | class IOAuthProcedureForNintendoAccountLinkage final |
| 232 | : public ServiceFramework<IOAuthProcedureForNintendoAccountLinkage> { | 232 | : public ServiceFramework<IOAuthProcedureForNintendoAccountLinkage> { |
| 233 | public: | 233 | public: |
| 234 | explicit IOAuthProcedureForNintendoAccountLinkage(Core::System& system_, Common::NewUUID) | 234 | explicit IOAuthProcedureForNintendoAccountLinkage(Core::System& system_, Common::UUID) |
| 235 | : ServiceFramework{system_, "IOAuthProcedureForNintendoAccountLinkage"} { | 235 | : ServiceFramework{system_, "IOAuthProcedureForNintendoAccountLinkage"} { |
| 236 | // clang-format off | 236 | // clang-format off |
| 237 | static const FunctionInfo functions[] = { | 237 | static const FunctionInfo functions[] = { |
| @@ -252,7 +252,7 @@ public: | |||
| 252 | 252 | ||
| 253 | class INotifier final : public ServiceFramework<INotifier> { | 253 | class INotifier final : public ServiceFramework<INotifier> { |
| 254 | public: | 254 | public: |
| 255 | explicit INotifier(Core::System& system_, Common::NewUUID) | 255 | explicit INotifier(Core::System& system_, Common::UUID) |
| 256 | : ServiceFramework{system_, "INotifier"} { | 256 | : ServiceFramework{system_, "INotifier"} { |
| 257 | // clang-format off | 257 | // clang-format off |
| 258 | static const FunctionInfo functions[] = { | 258 | static const FunctionInfo functions[] = { |
| @@ -267,7 +267,7 @@ public: | |||
| 267 | class IProfileCommon : public ServiceFramework<IProfileCommon> { | 267 | class IProfileCommon : public ServiceFramework<IProfileCommon> { |
| 268 | public: | 268 | public: |
| 269 | explicit IProfileCommon(Core::System& system_, const char* name, bool editor_commands, | 269 | explicit IProfileCommon(Core::System& system_, const char* name, bool editor_commands, |
| 270 | Common::NewUUID user_id_, ProfileManager& profile_manager_) | 270 | Common::UUID user_id_, ProfileManager& profile_manager_) |
| 271 | : ServiceFramework{system_, name}, profile_manager{profile_manager_}, user_id{user_id_} { | 271 | : ServiceFramework{system_, name}, profile_manager{profile_manager_}, user_id{user_id_} { |
| 272 | static const FunctionInfo functions[] = { | 272 | static const FunctionInfo functions[] = { |
| 273 | {0, &IProfileCommon::Get, "Get"}, | 273 | {0, &IProfileCommon::Get, "Get"}, |
| @@ -435,26 +435,26 @@ protected: | |||
| 435 | } | 435 | } |
| 436 | 436 | ||
| 437 | ProfileManager& profile_manager; | 437 | ProfileManager& profile_manager; |
| 438 | Common::NewUUID user_id{}; ///< The user id this profile refers to. | 438 | Common::UUID user_id{}; ///< The user id this profile refers to. |
| 439 | }; | 439 | }; |
| 440 | 440 | ||
| 441 | class IProfile final : public IProfileCommon { | 441 | class IProfile final : public IProfileCommon { |
| 442 | public: | 442 | public: |
| 443 | explicit IProfile(Core::System& system_, Common::NewUUID user_id_, | 443 | explicit IProfile(Core::System& system_, Common::UUID user_id_, |
| 444 | ProfileManager& profile_manager_) | 444 | ProfileManager& profile_manager_) |
| 445 | : IProfileCommon{system_, "IProfile", false, user_id_, profile_manager_} {} | 445 | : IProfileCommon{system_, "IProfile", false, user_id_, profile_manager_} {} |
| 446 | }; | 446 | }; |
| 447 | 447 | ||
| 448 | class IProfileEditor final : public IProfileCommon { | 448 | class IProfileEditor final : public IProfileCommon { |
| 449 | public: | 449 | public: |
| 450 | explicit IProfileEditor(Core::System& system_, Common::NewUUID user_id_, | 450 | explicit IProfileEditor(Core::System& system_, Common::UUID user_id_, |
| 451 | ProfileManager& profile_manager_) | 451 | ProfileManager& profile_manager_) |
| 452 | : IProfileCommon{system_, "IProfileEditor", true, user_id_, profile_manager_} {} | 452 | : IProfileCommon{system_, "IProfileEditor", true, user_id_, profile_manager_} {} |
| 453 | }; | 453 | }; |
| 454 | 454 | ||
| 455 | class ISessionObject final : public ServiceFramework<ISessionObject> { | 455 | class ISessionObject final : public ServiceFramework<ISessionObject> { |
| 456 | public: | 456 | public: |
| 457 | explicit ISessionObject(Core::System& system_, Common::NewUUID) | 457 | explicit ISessionObject(Core::System& system_, Common::UUID) |
| 458 | : ServiceFramework{system_, "ISessionObject"} { | 458 | : ServiceFramework{system_, "ISessionObject"} { |
| 459 | // clang-format off | 459 | // clang-format off |
| 460 | static const FunctionInfo functions[] = { | 460 | static const FunctionInfo functions[] = { |
| @@ -468,7 +468,7 @@ public: | |||
| 468 | 468 | ||
| 469 | class IGuestLoginRequest final : public ServiceFramework<IGuestLoginRequest> { | 469 | class IGuestLoginRequest final : public ServiceFramework<IGuestLoginRequest> { |
| 470 | public: | 470 | public: |
| 471 | explicit IGuestLoginRequest(Core::System& system_, Common::NewUUID) | 471 | explicit IGuestLoginRequest(Core::System& system_, Common::UUID) |
| 472 | : ServiceFramework{system_, "IGuestLoginRequest"} { | 472 | : ServiceFramework{system_, "IGuestLoginRequest"} { |
| 473 | // clang-format off | 473 | // clang-format off |
| 474 | static const FunctionInfo functions[] = { | 474 | static const FunctionInfo functions[] = { |
| @@ -514,7 +514,7 @@ protected: | |||
| 514 | 514 | ||
| 515 | class IManagerForApplication final : public ServiceFramework<IManagerForApplication> { | 515 | class IManagerForApplication final : public ServiceFramework<IManagerForApplication> { |
| 516 | public: | 516 | public: |
| 517 | explicit IManagerForApplication(Core::System& system_, Common::NewUUID user_id_) | 517 | explicit IManagerForApplication(Core::System& system_, Common::UUID user_id_) |
| 518 | : ServiceFramework{system_, "IManagerForApplication"}, | 518 | : ServiceFramework{system_, "IManagerForApplication"}, |
| 519 | ensure_token_id{std::make_shared<EnsureTokenIdCacheAsyncInterface>(system)}, | 519 | ensure_token_id{std::make_shared<EnsureTokenIdCacheAsyncInterface>(system)}, |
| 520 | user_id{user_id_} { | 520 | user_id{user_id_} { |
| @@ -587,14 +587,14 @@ private: | |||
| 587 | } | 587 | } |
| 588 | 588 | ||
| 589 | std::shared_ptr<EnsureTokenIdCacheAsyncInterface> ensure_token_id{}; | 589 | std::shared_ptr<EnsureTokenIdCacheAsyncInterface> ensure_token_id{}; |
| 590 | Common::NewUUID user_id{}; | 590 | Common::UUID user_id{}; |
| 591 | }; | 591 | }; |
| 592 | 592 | ||
| 593 | // 6.0.0+ | 593 | // 6.0.0+ |
| 594 | class IAsyncNetworkServiceLicenseKindContext final | 594 | class IAsyncNetworkServiceLicenseKindContext final |
| 595 | : public ServiceFramework<IAsyncNetworkServiceLicenseKindContext> { | 595 | : public ServiceFramework<IAsyncNetworkServiceLicenseKindContext> { |
| 596 | public: | 596 | public: |
| 597 | explicit IAsyncNetworkServiceLicenseKindContext(Core::System& system_, Common::NewUUID) | 597 | explicit IAsyncNetworkServiceLicenseKindContext(Core::System& system_, Common::UUID) |
| 598 | : ServiceFramework{system_, "IAsyncNetworkServiceLicenseKindContext"} { | 598 | : ServiceFramework{system_, "IAsyncNetworkServiceLicenseKindContext"} { |
| 599 | // clang-format off | 599 | // clang-format off |
| 600 | static const FunctionInfo functions[] = { | 600 | static const FunctionInfo functions[] = { |
| @@ -614,7 +614,7 @@ public: | |||
| 614 | class IOAuthProcedureForUserRegistration final | 614 | class IOAuthProcedureForUserRegistration final |
| 615 | : public ServiceFramework<IOAuthProcedureForUserRegistration> { | 615 | : public ServiceFramework<IOAuthProcedureForUserRegistration> { |
| 616 | public: | 616 | public: |
| 617 | explicit IOAuthProcedureForUserRegistration(Core::System& system_, Common::NewUUID) | 617 | explicit IOAuthProcedureForUserRegistration(Core::System& system_, Common::UUID) |
| 618 | : ServiceFramework{system_, "IOAuthProcedureForUserRegistration"} { | 618 | : ServiceFramework{system_, "IOAuthProcedureForUserRegistration"} { |
| 619 | // clang-format off | 619 | // clang-format off |
| 620 | static const FunctionInfo functions[] = { | 620 | static const FunctionInfo functions[] = { |
| @@ -638,8 +638,7 @@ public: | |||
| 638 | 638 | ||
| 639 | class DAUTH_O final : public ServiceFramework<DAUTH_O> { | 639 | class DAUTH_O final : public ServiceFramework<DAUTH_O> { |
| 640 | public: | 640 | public: |
| 641 | explicit DAUTH_O(Core::System& system_, Common::NewUUID) | 641 | explicit DAUTH_O(Core::System& system_, Common::UUID) : ServiceFramework{system_, "dauth:o"} { |
| 642 | : ServiceFramework{system_, "dauth:o"} { | ||
| 643 | // clang-format off | 642 | // clang-format off |
| 644 | static const FunctionInfo functions[] = { | 643 | static const FunctionInfo functions[] = { |
| 645 | {0, nullptr, "EnsureAuthenticationTokenCacheAsync"}, | 644 | {0, nullptr, "EnsureAuthenticationTokenCacheAsync"}, |
| @@ -663,7 +662,7 @@ public: | |||
| 663 | // 6.0.0+ | 662 | // 6.0.0+ |
| 664 | class IAsyncResult final : public ServiceFramework<IAsyncResult> { | 663 | class IAsyncResult final : public ServiceFramework<IAsyncResult> { |
| 665 | public: | 664 | public: |
| 666 | explicit IAsyncResult(Core::System& system_, Common::NewUUID) | 665 | explicit IAsyncResult(Core::System& system_, Common::UUID) |
| 667 | : ServiceFramework{system_, "IAsyncResult"} { | 666 | : ServiceFramework{system_, "IAsyncResult"} { |
| 668 | // clang-format off | 667 | // clang-format off |
| 669 | static const FunctionInfo functions[] = { | 668 | static const FunctionInfo functions[] = { |
| @@ -687,7 +686,7 @@ void Module::Interface::GetUserCount(Kernel::HLERequestContext& ctx) { | |||
| 687 | 686 | ||
| 688 | void Module::Interface::GetUserExistence(Kernel::HLERequestContext& ctx) { | 687 | void Module::Interface::GetUserExistence(Kernel::HLERequestContext& ctx) { |
| 689 | IPC::RequestParser rp{ctx}; | 688 | IPC::RequestParser rp{ctx}; |
| 690 | Common::NewUUID user_id = rp.PopRaw<Common::NewUUID>(); | 689 | Common::UUID user_id = rp.PopRaw<Common::UUID>(); |
| 691 | LOG_DEBUG(Service_ACC, "called user_id=0x{}", user_id.RawString()); | 690 | LOG_DEBUG(Service_ACC, "called user_id=0x{}", user_id.RawString()); |
| 692 | 691 | ||
| 693 | IPC::ResponseBuilder rb{ctx, 3}; | 692 | IPC::ResponseBuilder rb{ctx, 3}; |
| @@ -713,12 +712,12 @@ void Module::Interface::GetLastOpenedUser(Kernel::HLERequestContext& ctx) { | |||
| 713 | LOG_DEBUG(Service_ACC, "called"); | 712 | LOG_DEBUG(Service_ACC, "called"); |
| 714 | IPC::ResponseBuilder rb{ctx, 6}; | 713 | IPC::ResponseBuilder rb{ctx, 6}; |
| 715 | rb.Push(ResultSuccess); | 714 | rb.Push(ResultSuccess); |
| 716 | rb.PushRaw<Common::NewUUID>(profile_manager->GetLastOpenedUser()); | 715 | rb.PushRaw<Common::UUID>(profile_manager->GetLastOpenedUser()); |
| 717 | } | 716 | } |
| 718 | 717 | ||
| 719 | void Module::Interface::GetProfile(Kernel::HLERequestContext& ctx) { | 718 | void Module::Interface::GetProfile(Kernel::HLERequestContext& ctx) { |
| 720 | IPC::RequestParser rp{ctx}; | 719 | IPC::RequestParser rp{ctx}; |
| 721 | Common::NewUUID user_id = rp.PopRaw<Common::NewUUID>(); | 720 | Common::UUID user_id = rp.PopRaw<Common::UUID>(); |
| 722 | LOG_DEBUG(Service_ACC, "called user_id=0x{}", user_id.RawString()); | 721 | LOG_DEBUG(Service_ACC, "called user_id=0x{}", user_id.RawString()); |
| 723 | 722 | ||
| 724 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 723 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| @@ -832,7 +831,7 @@ void Module::Interface::InitializeApplicationInfoV2(Kernel::HLERequestContext& c | |||
| 832 | 831 | ||
| 833 | void Module::Interface::GetProfileEditor(Kernel::HLERequestContext& ctx) { | 832 | void Module::Interface::GetProfileEditor(Kernel::HLERequestContext& ctx) { |
| 834 | IPC::RequestParser rp{ctx}; | 833 | IPC::RequestParser rp{ctx}; |
| 835 | Common::NewUUID user_id = rp.PopRaw<Common::NewUUID>(); | 834 | Common::UUID user_id = rp.PopRaw<Common::UUID>(); |
| 836 | 835 | ||
| 837 | LOG_DEBUG(Service_ACC, "called, user_id=0x{}", user_id.RawString()); | 836 | LOG_DEBUG(Service_ACC, "called, user_id=0x{}", user_id.RawString()); |
| 838 | 837 | ||
| @@ -874,7 +873,7 @@ void Module::Interface::ListOpenContextStoredUsers(Kernel::HLERequestContext& ct | |||
| 874 | 873 | ||
| 875 | void Module::Interface::StoreSaveDataThumbnailApplication(Kernel::HLERequestContext& ctx) { | 874 | void Module::Interface::StoreSaveDataThumbnailApplication(Kernel::HLERequestContext& ctx) { |
| 876 | IPC::RequestParser rp{ctx}; | 875 | IPC::RequestParser rp{ctx}; |
| 877 | const auto uuid = rp.PopRaw<Common::NewUUID>(); | 876 | const auto uuid = rp.PopRaw<Common::UUID>(); |
| 878 | 877 | ||
| 879 | LOG_WARNING(Service_ACC, "(STUBBED) called, uuid=0x{}", uuid.RawString()); | 878 | LOG_WARNING(Service_ACC, "(STUBBED) called, uuid=0x{}", uuid.RawString()); |
| 880 | 879 | ||
| @@ -887,7 +886,7 @@ void Module::Interface::StoreSaveDataThumbnailApplication(Kernel::HLERequestCont | |||
| 887 | 886 | ||
| 888 | void Module::Interface::StoreSaveDataThumbnailSystem(Kernel::HLERequestContext& ctx) { | 887 | void Module::Interface::StoreSaveDataThumbnailSystem(Kernel::HLERequestContext& ctx) { |
| 889 | IPC::RequestParser rp{ctx}; | 888 | IPC::RequestParser rp{ctx}; |
| 890 | const auto uuid = rp.PopRaw<Common::NewUUID>(); | 889 | const auto uuid = rp.PopRaw<Common::UUID>(); |
| 891 | const auto tid = rp.Pop<u64_le>(); | 890 | const auto tid = rp.Pop<u64_le>(); |
| 892 | 891 | ||
| 893 | LOG_WARNING(Service_ACC, "(STUBBED) called, uuid=0x{}, tid={:016X}", uuid.RawString(), tid); | 892 | LOG_WARNING(Service_ACC, "(STUBBED) called, uuid=0x{}, tid={:016X}", uuid.RawString(), tid); |
| @@ -895,7 +894,7 @@ void Module::Interface::StoreSaveDataThumbnailSystem(Kernel::HLERequestContext& | |||
| 895 | } | 894 | } |
| 896 | 895 | ||
| 897 | void Module::Interface::StoreSaveDataThumbnail(Kernel::HLERequestContext& ctx, | 896 | void Module::Interface::StoreSaveDataThumbnail(Kernel::HLERequestContext& ctx, |
| 898 | const Common::NewUUID& uuid, const u64 tid) { | 897 | const Common::UUID& uuid, const u64 tid) { |
| 899 | IPC::ResponseBuilder rb{ctx, 2}; | 898 | IPC::ResponseBuilder rb{ctx, 2}; |
| 900 | 899 | ||
| 901 | if (tid == 0) { | 900 | if (tid == 0) { |
diff --git a/src/core/hle/service/acc/acc.h b/src/core/hle/service/acc/acc.h index b57342701..f7e9bc4f8 100644 --- a/src/core/hle/service/acc/acc.h +++ b/src/core/hle/service/acc/acc.h | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | 4 | ||
| 5 | #pragma once | 5 | #pragma once |
| 6 | 6 | ||
| 7 | #include "common/new_uuid.h" | 7 | #include "common/uuid.h" |
| 8 | #include "core/hle/service/glue/glue_manager.h" | 8 | #include "core/hle/service/glue/glue_manager.h" |
| 9 | #include "core/hle/service/service.h" | 9 | #include "core/hle/service/service.h" |
| 10 | 10 | ||
| @@ -43,7 +43,7 @@ public: | |||
| 43 | 43 | ||
| 44 | private: | 44 | private: |
| 45 | ResultCode InitializeApplicationInfoBase(); | 45 | ResultCode InitializeApplicationInfoBase(); |
| 46 | void StoreSaveDataThumbnail(Kernel::HLERequestContext& ctx, const Common::NewUUID& uuid, | 46 | void StoreSaveDataThumbnail(Kernel::HLERequestContext& ctx, const Common::UUID& uuid, |
| 47 | const u64 tid); | 47 | const u64 tid); |
| 48 | 48 | ||
| 49 | enum class ApplicationType : u32_le { | 49 | enum class ApplicationType : u32_le { |
diff --git a/src/core/hle/service/acc/profile_manager.cpp b/src/core/hle/service/acc/profile_manager.cpp index 366f3fe14..fba847142 100644 --- a/src/core/hle/service/acc/profile_manager.cpp +++ b/src/core/hle/service/acc/profile_manager.cpp | |||
| @@ -16,11 +16,11 @@ | |||
| 16 | namespace Service::Account { | 16 | namespace Service::Account { |
| 17 | 17 | ||
| 18 | namespace FS = Common::FS; | 18 | namespace FS = Common::FS; |
| 19 | using Common::NewUUID; | 19 | using Common::UUID; |
| 20 | 20 | ||
| 21 | struct UserRaw { | 21 | struct UserRaw { |
| 22 | NewUUID uuid{}; | 22 | UUID uuid{}; |
| 23 | NewUUID uuid2{}; | 23 | UUID uuid2{}; |
| 24 | u64 timestamp{}; | 24 | u64 timestamp{}; |
| 25 | ProfileUsername username{}; | 25 | ProfileUsername username{}; |
| 26 | ProfileData extra_data{}; | 26 | ProfileData extra_data{}; |
| @@ -45,7 +45,7 @@ ProfileManager::ProfileManager() { | |||
| 45 | 45 | ||
| 46 | // Create an user if none are present | 46 | // Create an user if none are present |
| 47 | if (user_count == 0) { | 47 | if (user_count == 0) { |
| 48 | CreateNewUser(NewUUID::MakeRandom(), "yuzu"); | 48 | CreateNewUser(UUID::MakeRandom(), "yuzu"); |
| 49 | } | 49 | } |
| 50 | 50 | ||
| 51 | auto current = | 51 | auto current = |
| @@ -97,7 +97,7 @@ ResultCode ProfileManager::AddUser(const ProfileInfo& user) { | |||
| 97 | 97 | ||
| 98 | /// Create a new user on the system. If the uuid of the user already exists, the user is not | 98 | /// Create a new user on the system. If the uuid of the user already exists, the user is not |
| 99 | /// created. | 99 | /// created. |
| 100 | ResultCode ProfileManager::CreateNewUser(NewUUID uuid, const ProfileUsername& username) { | 100 | ResultCode ProfileManager::CreateNewUser(UUID uuid, const ProfileUsername& username) { |
| 101 | if (user_count == MAX_USERS) { | 101 | if (user_count == MAX_USERS) { |
| 102 | return ERROR_TOO_MANY_USERS; | 102 | return ERROR_TOO_MANY_USERS; |
| 103 | } | 103 | } |
| @@ -124,7 +124,7 @@ ResultCode ProfileManager::CreateNewUser(NewUUID uuid, const ProfileUsername& us | |||
| 124 | /// Creates a new user on the system. This function allows a much simpler method of registration | 124 | /// Creates a new user on the system. This function allows a much simpler method of registration |
| 125 | /// specifically by allowing an std::string for the username. This is required specifically since | 125 | /// specifically by allowing an std::string for the username. This is required specifically since |
| 126 | /// we're loading a string straight from the config | 126 | /// we're loading a string straight from the config |
| 127 | ResultCode ProfileManager::CreateNewUser(NewUUID uuid, const std::string& username) { | 127 | ResultCode ProfileManager::CreateNewUser(UUID uuid, const std::string& username) { |
| 128 | ProfileUsername username_output{}; | 128 | ProfileUsername username_output{}; |
| 129 | 129 | ||
| 130 | if (username.size() > username_output.size()) { | 130 | if (username.size() > username_output.size()) { |
| @@ -135,7 +135,7 @@ ResultCode ProfileManager::CreateNewUser(NewUUID uuid, const std::string& userna | |||
| 135 | return CreateNewUser(uuid, username_output); | 135 | return CreateNewUser(uuid, username_output); |
| 136 | } | 136 | } |
| 137 | 137 | ||
| 138 | std::optional<NewUUID> ProfileManager::GetUser(std::size_t index) const { | 138 | std::optional<UUID> ProfileManager::GetUser(std::size_t index) const { |
| 139 | if (index >= MAX_USERS) { | 139 | if (index >= MAX_USERS) { |
| 140 | return std::nullopt; | 140 | return std::nullopt; |
| 141 | } | 141 | } |
| @@ -144,7 +144,7 @@ std::optional<NewUUID> ProfileManager::GetUser(std::size_t index) const { | |||
| 144 | } | 144 | } |
| 145 | 145 | ||
| 146 | /// Returns a users profile index based on their user id. | 146 | /// Returns a users profile index based on their user id. |
| 147 | std::optional<std::size_t> ProfileManager::GetUserIndex(const NewUUID& uuid) const { | 147 | std::optional<std::size_t> ProfileManager::GetUserIndex(const UUID& uuid) const { |
| 148 | if (uuid.IsInvalid()) { | 148 | if (uuid.IsInvalid()) { |
| 149 | return std::nullopt; | 149 | return std::nullopt; |
| 150 | } | 150 | } |
| @@ -176,7 +176,7 @@ bool ProfileManager::GetProfileBase(std::optional<std::size_t> index, ProfileBas | |||
| 176 | } | 176 | } |
| 177 | 177 | ||
| 178 | /// Returns the data structure used by the switch when GetProfileBase is called on acc:* | 178 | /// Returns the data structure used by the switch when GetProfileBase is called on acc:* |
| 179 | bool ProfileManager::GetProfileBase(NewUUID uuid, ProfileBase& profile) const { | 179 | bool ProfileManager::GetProfileBase(UUID uuid, ProfileBase& profile) const { |
| 180 | const auto idx = GetUserIndex(uuid); | 180 | const auto idx = GetUserIndex(uuid); |
| 181 | return GetProfileBase(idx, profile); | 181 | return GetProfileBase(idx, profile); |
| 182 | } | 182 | } |
| @@ -203,7 +203,7 @@ std::size_t ProfileManager::GetOpenUserCount() const { | |||
| 203 | } | 203 | } |
| 204 | 204 | ||
| 205 | /// Checks if a user id exists in our profile manager | 205 | /// Checks if a user id exists in our profile manager |
| 206 | bool ProfileManager::UserExists(NewUUID uuid) const { | 206 | bool ProfileManager::UserExists(UUID uuid) const { |
| 207 | return GetUserIndex(uuid).has_value(); | 207 | return GetUserIndex(uuid).has_value(); |
| 208 | } | 208 | } |
| 209 | 209 | ||
| @@ -215,7 +215,7 @@ bool ProfileManager::UserExistsIndex(std::size_t index) const { | |||
| 215 | } | 215 | } |
| 216 | 216 | ||
| 217 | /// Opens a specific user | 217 | /// Opens a specific user |
| 218 | void ProfileManager::OpenUser(NewUUID uuid) { | 218 | void ProfileManager::OpenUser(UUID uuid) { |
| 219 | const auto idx = GetUserIndex(uuid); | 219 | const auto idx = GetUserIndex(uuid); |
| 220 | if (!idx) { | 220 | if (!idx) { |
| 221 | return; | 221 | return; |
| @@ -226,7 +226,7 @@ void ProfileManager::OpenUser(NewUUID uuid) { | |||
| 226 | } | 226 | } |
| 227 | 227 | ||
| 228 | /// Closes a specific user | 228 | /// Closes a specific user |
| 229 | void ProfileManager::CloseUser(NewUUID uuid) { | 229 | void ProfileManager::CloseUser(UUID uuid) { |
| 230 | const auto idx = GetUserIndex(uuid); | 230 | const auto idx = GetUserIndex(uuid); |
| 231 | if (!idx) { | 231 | if (!idx) { |
| 232 | return; | 232 | return; |
| @@ -253,12 +253,12 @@ UserIDArray ProfileManager::GetOpenUsers() const { | |||
| 253 | return Common::InvalidUUID; | 253 | return Common::InvalidUUID; |
| 254 | }); | 254 | }); |
| 255 | std::stable_partition(output.begin(), output.end(), | 255 | std::stable_partition(output.begin(), output.end(), |
| 256 | [](const NewUUID& uuid) { return uuid.IsValid(); }); | 256 | [](const UUID& uuid) { return uuid.IsValid(); }); |
| 257 | return output; | 257 | return output; |
| 258 | } | 258 | } |
| 259 | 259 | ||
| 260 | /// Returns the last user which was opened | 260 | /// Returns the last user which was opened |
| 261 | NewUUID ProfileManager::GetLastOpenedUser() const { | 261 | UUID ProfileManager::GetLastOpenedUser() const { |
| 262 | return last_opened_user; | 262 | return last_opened_user; |
| 263 | } | 263 | } |
| 264 | 264 | ||
| @@ -273,7 +273,7 @@ bool ProfileManager::GetProfileBaseAndData(std::optional<std::size_t> index, Pro | |||
| 273 | } | 273 | } |
| 274 | 274 | ||
| 275 | /// Return the users profile base and the unknown arbitary data. | 275 | /// Return the users profile base and the unknown arbitary data. |
| 276 | bool ProfileManager::GetProfileBaseAndData(NewUUID uuid, ProfileBase& profile, | 276 | bool ProfileManager::GetProfileBaseAndData(UUID uuid, ProfileBase& profile, |
| 277 | ProfileData& data) const { | 277 | ProfileData& data) const { |
| 278 | const auto idx = GetUserIndex(uuid); | 278 | const auto idx = GetUserIndex(uuid); |
| 279 | return GetProfileBaseAndData(idx, profile, data); | 279 | return GetProfileBaseAndData(idx, profile, data); |
| @@ -292,7 +292,7 @@ bool ProfileManager::CanSystemRegisterUser() const { | |||
| 292 | // emulate qlaunch. Update this to dynamically change. | 292 | // emulate qlaunch. Update this to dynamically change. |
| 293 | } | 293 | } |
| 294 | 294 | ||
| 295 | bool ProfileManager::RemoveUser(NewUUID uuid) { | 295 | bool ProfileManager::RemoveUser(UUID uuid) { |
| 296 | const auto index = GetUserIndex(uuid); | 296 | const auto index = GetUserIndex(uuid); |
| 297 | if (!index) { | 297 | if (!index) { |
| 298 | return false; | 298 | return false; |
| @@ -304,7 +304,7 @@ bool ProfileManager::RemoveUser(NewUUID uuid) { | |||
| 304 | return true; | 304 | return true; |
| 305 | } | 305 | } |
| 306 | 306 | ||
| 307 | bool ProfileManager::SetProfileBase(NewUUID uuid, const ProfileBase& profile_new) { | 307 | bool ProfileManager::SetProfileBase(UUID uuid, const ProfileBase& profile_new) { |
| 308 | const auto index = GetUserIndex(uuid); | 308 | const auto index = GetUserIndex(uuid); |
| 309 | if (!index || profile_new.user_uuid.IsInvalid()) { | 309 | if (!index || profile_new.user_uuid.IsInvalid()) { |
| 310 | return false; | 310 | return false; |
| @@ -318,7 +318,7 @@ bool ProfileManager::SetProfileBase(NewUUID uuid, const ProfileBase& profile_new | |||
| 318 | return true; | 318 | return true; |
| 319 | } | 319 | } |
| 320 | 320 | ||
| 321 | bool ProfileManager::SetProfileBaseAndData(Common::NewUUID uuid, const ProfileBase& profile_new, | 321 | bool ProfileManager::SetProfileBaseAndData(Common::UUID uuid, const ProfileBase& profile_new, |
| 322 | const ProfileData& data_new) { | 322 | const ProfileData& data_new) { |
| 323 | const auto index = GetUserIndex(uuid); | 323 | const auto index = GetUserIndex(uuid); |
| 324 | if (index.has_value() && SetProfileBase(uuid, profile_new)) { | 324 | if (index.has_value() && SetProfileBase(uuid, profile_new)) { |
| @@ -336,14 +336,14 @@ void ProfileManager::ParseUserSaveFile() { | |||
| 336 | 336 | ||
| 337 | if (!save.IsOpen()) { | 337 | if (!save.IsOpen()) { |
| 338 | LOG_WARNING(Service_ACC, "Failed to load profile data from save data... Generating new " | 338 | LOG_WARNING(Service_ACC, "Failed to load profile data from save data... Generating new " |
| 339 | "user 'yuzu' with random NewUUID."); | 339 | "user 'yuzu' with random UUID."); |
| 340 | return; | 340 | return; |
| 341 | } | 341 | } |
| 342 | 342 | ||
| 343 | ProfileDataRaw data; | 343 | ProfileDataRaw data; |
| 344 | if (!save.ReadObject(data)) { | 344 | if (!save.ReadObject(data)) { |
| 345 | LOG_WARNING(Service_ACC, "profiles.dat is smaller than expected... Generating new user " | 345 | LOG_WARNING(Service_ACC, "profiles.dat is smaller than expected... Generating new user " |
| 346 | "'yuzu' with random NewUUID."); | 346 | "'yuzu' with random UUID."); |
| 347 | return; | 347 | return; |
| 348 | } | 348 | } |
| 349 | 349 | ||
diff --git a/src/core/hle/service/acc/profile_manager.h b/src/core/hle/service/acc/profile_manager.h index e9c58a826..17347f7ef 100644 --- a/src/core/hle/service/acc/profile_manager.h +++ b/src/core/hle/service/acc/profile_manager.h | |||
| @@ -8,8 +8,8 @@ | |||
| 8 | #include <optional> | 8 | #include <optional> |
| 9 | 9 | ||
| 10 | #include "common/common_types.h" | 10 | #include "common/common_types.h" |
| 11 | #include "common/new_uuid.h" | ||
| 12 | #include "common/swap.h" | 11 | #include "common/swap.h" |
| 12 | #include "common/uuid.h" | ||
| 13 | #include "core/hle/result.h" | 13 | #include "core/hle/result.h" |
| 14 | 14 | ||
| 15 | namespace Service::Account { | 15 | namespace Service::Account { |
| @@ -18,7 +18,7 @@ constexpr std::size_t MAX_USERS{8}; | |||
| 18 | constexpr std::size_t profile_username_size{32}; | 18 | constexpr std::size_t profile_username_size{32}; |
| 19 | 19 | ||
| 20 | using ProfileUsername = std::array<u8, profile_username_size>; | 20 | using ProfileUsername = std::array<u8, profile_username_size>; |
| 21 | using UserIDArray = std::array<Common::NewUUID, MAX_USERS>; | 21 | using UserIDArray = std::array<Common::UUID, MAX_USERS>; |
| 22 | 22 | ||
| 23 | /// Contains extra data related to a user. | 23 | /// Contains extra data related to a user. |
| 24 | /// TODO: RE this structure | 24 | /// TODO: RE this structure |
| @@ -35,7 +35,7 @@ static_assert(sizeof(ProfileData) == 0x80, "ProfileData structure has incorrect | |||
| 35 | /// This holds general information about a users profile. This is where we store all the information | 35 | /// This holds general information about a users profile. This is where we store all the information |
| 36 | /// based on a specific user | 36 | /// based on a specific user |
| 37 | struct ProfileInfo { | 37 | struct ProfileInfo { |
| 38 | Common::NewUUID user_uuid{}; | 38 | Common::UUID user_uuid{}; |
| 39 | ProfileUsername username{}; | 39 | ProfileUsername username{}; |
| 40 | u64 creation_time{}; | 40 | u64 creation_time{}; |
| 41 | ProfileData data{}; // TODO(ognik): Work out what this is | 41 | ProfileData data{}; // TODO(ognik): Work out what this is |
| @@ -43,7 +43,7 @@ struct ProfileInfo { | |||
| 43 | }; | 43 | }; |
| 44 | 44 | ||
| 45 | struct ProfileBase { | 45 | struct ProfileBase { |
| 46 | Common::NewUUID user_uuid; | 46 | Common::UUID user_uuid; |
| 47 | u64_le timestamp; | 47 | u64_le timestamp; |
| 48 | ProfileUsername username; | 48 | ProfileUsername username; |
| 49 | 49 | ||
| @@ -65,34 +65,34 @@ public: | |||
| 65 | ~ProfileManager(); | 65 | ~ProfileManager(); |
| 66 | 66 | ||
| 67 | ResultCode AddUser(const ProfileInfo& user); | 67 | ResultCode AddUser(const ProfileInfo& user); |
| 68 | ResultCode CreateNewUser(Common::NewUUID uuid, const ProfileUsername& username); | 68 | ResultCode CreateNewUser(Common::UUID uuid, const ProfileUsername& username); |
| 69 | ResultCode CreateNewUser(Common::NewUUID uuid, const std::string& username); | 69 | ResultCode CreateNewUser(Common::UUID uuid, const std::string& username); |
| 70 | std::optional<Common::NewUUID> GetUser(std::size_t index) const; | 70 | std::optional<Common::UUID> GetUser(std::size_t index) const; |
| 71 | std::optional<std::size_t> GetUserIndex(const Common::NewUUID& uuid) const; | 71 | std::optional<std::size_t> GetUserIndex(const Common::UUID& uuid) const; |
| 72 | std::optional<std::size_t> GetUserIndex(const ProfileInfo& user) const; | 72 | std::optional<std::size_t> GetUserIndex(const ProfileInfo& user) const; |
| 73 | bool GetProfileBase(std::optional<std::size_t> index, ProfileBase& profile) const; | 73 | bool GetProfileBase(std::optional<std::size_t> index, ProfileBase& profile) const; |
| 74 | bool GetProfileBase(Common::NewUUID uuid, ProfileBase& profile) const; | 74 | bool GetProfileBase(Common::UUID uuid, ProfileBase& profile) const; |
| 75 | bool GetProfileBase(const ProfileInfo& user, ProfileBase& profile) const; | 75 | bool GetProfileBase(const ProfileInfo& user, ProfileBase& profile) const; |
| 76 | bool GetProfileBaseAndData(std::optional<std::size_t> index, ProfileBase& profile, | 76 | bool GetProfileBaseAndData(std::optional<std::size_t> index, ProfileBase& profile, |
| 77 | ProfileData& data) const; | 77 | ProfileData& data) const; |
| 78 | bool GetProfileBaseAndData(Common::NewUUID uuid, ProfileBase& profile, ProfileData& data) const; | 78 | bool GetProfileBaseAndData(Common::UUID uuid, ProfileBase& profile, ProfileData& data) const; |
| 79 | bool GetProfileBaseAndData(const ProfileInfo& user, ProfileBase& profile, | 79 | bool GetProfileBaseAndData(const ProfileInfo& user, ProfileBase& profile, |
| 80 | ProfileData& data) const; | 80 | ProfileData& data) const; |
| 81 | std::size_t GetUserCount() const; | 81 | std::size_t GetUserCount() const; |
| 82 | std::size_t GetOpenUserCount() const; | 82 | std::size_t GetOpenUserCount() const; |
| 83 | bool UserExists(Common::NewUUID uuid) const; | 83 | bool UserExists(Common::UUID uuid) const; |
| 84 | bool UserExistsIndex(std::size_t index) const; | 84 | bool UserExistsIndex(std::size_t index) const; |
| 85 | void OpenUser(Common::NewUUID uuid); | 85 | void OpenUser(Common::UUID uuid); |
| 86 | void CloseUser(Common::NewUUID uuid); | 86 | void CloseUser(Common::UUID uuid); |
| 87 | UserIDArray GetOpenUsers() const; | 87 | UserIDArray GetOpenUsers() const; |
| 88 | UserIDArray GetAllUsers() const; | 88 | UserIDArray GetAllUsers() const; |
| 89 | Common::NewUUID GetLastOpenedUser() const; | 89 | Common::UUID GetLastOpenedUser() const; |
| 90 | 90 | ||
| 91 | bool CanSystemRegisterUser() const; | 91 | bool CanSystemRegisterUser() const; |
| 92 | 92 | ||
| 93 | bool RemoveUser(Common::NewUUID uuid); | 93 | bool RemoveUser(Common::UUID uuid); |
| 94 | bool SetProfileBase(Common::NewUUID uuid, const ProfileBase& profile_new); | 94 | bool SetProfileBase(Common::UUID uuid, const ProfileBase& profile_new); |
| 95 | bool SetProfileBaseAndData(Common::NewUUID uuid, const ProfileBase& profile_new, | 95 | bool SetProfileBaseAndData(Common::UUID uuid, const ProfileBase& profile_new, |
| 96 | const ProfileData& data_new); | 96 | const ProfileData& data_new); |
| 97 | 97 | ||
| 98 | private: | 98 | private: |
| @@ -103,7 +103,7 @@ private: | |||
| 103 | 103 | ||
| 104 | std::array<ProfileInfo, MAX_USERS> profiles{}; | 104 | std::array<ProfileInfo, MAX_USERS> profiles{}; |
| 105 | std::size_t user_count{}; | 105 | std::size_t user_count{}; |
| 106 | Common::NewUUID last_opened_user{}; | 106 | Common::UUID last_opened_user{}; |
| 107 | }; | 107 | }; |
| 108 | 108 | ||
| 109 | }; // namespace Service::Account | 109 | }; // namespace Service::Account |
diff --git a/src/core/hle/service/am/am.cpp b/src/core/hle/service/am/am.cpp index 4cdc029b7..773dc9f29 100644 --- a/src/core/hle/service/am/am.cpp +++ b/src/core/hle/service/am/am.cpp | |||
| @@ -55,7 +55,7 @@ constexpr u32 LAUNCH_PARAMETER_ACCOUNT_PRESELECTED_USER_MAGIC = 0xC79497CA; | |||
| 55 | struct LaunchParameterAccountPreselectedUser { | 55 | struct LaunchParameterAccountPreselectedUser { |
| 56 | u32_le magic; | 56 | u32_le magic; |
| 57 | u32_le is_account_selected; | 57 | u32_le is_account_selected; |
| 58 | Common::NewUUID current_user; | 58 | Common::UUID current_user; |
| 59 | INSERT_PADDING_BYTES(0x70); | 59 | INSERT_PADDING_BYTES(0x70); |
| 60 | }; | 60 | }; |
| 61 | static_assert(sizeof(LaunchParameterAccountPreselectedUser) == 0x88); | 61 | static_assert(sizeof(LaunchParameterAccountPreselectedUser) == 0x88); |
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 3ac32fa58..82500e121 100644 --- a/src/core/hle/service/am/applets/applet_profile_select.cpp +++ b/src/core/hle/service/am/applets/applet_profile_select.cpp | |||
| @@ -54,11 +54,10 @@ void ProfileSelect::Execute() { | |||
| 54 | return; | 54 | return; |
| 55 | } | 55 | } |
| 56 | 56 | ||
| 57 | frontend.SelectProfile( | 57 | frontend.SelectProfile([this](std::optional<Common::UUID> uuid) { SelectionComplete(uuid); }); |
| 58 | [this](std::optional<Common::NewUUID> uuid) { SelectionComplete(uuid); }); | ||
| 59 | } | 58 | } |
| 60 | 59 | ||
| 61 | void ProfileSelect::SelectionComplete(std::optional<Common::NewUUID> uuid) { | 60 | void ProfileSelect::SelectionComplete(std::optional<Common::UUID> uuid) { |
| 62 | UserSelectionOutput output{}; | 61 | UserSelectionOutput output{}; |
| 63 | 62 | ||
| 64 | if (uuid.has_value() && uuid->IsValid()) { | 63 | if (uuid.has_value() && uuid->IsValid()) { |
diff --git a/src/core/hle/service/am/applets/applet_profile_select.h b/src/core/hle/service/am/applets/applet_profile_select.h index c5c506c41..852e1e0c0 100644 --- a/src/core/hle/service/am/applets/applet_profile_select.h +++ b/src/core/hle/service/am/applets/applet_profile_select.h | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | #include <vector> | 7 | #include <vector> |
| 8 | 8 | ||
| 9 | #include "common/common_funcs.h" | 9 | #include "common/common_funcs.h" |
| 10 | #include "common/new_uuid.h" | 10 | #include "common/uuid.h" |
| 11 | #include "core/hle/result.h" | 11 | #include "core/hle/result.h" |
| 12 | #include "core/hle/service/am/applets/applets.h" | 12 | #include "core/hle/service/am/applets/applets.h" |
| 13 | 13 | ||
| @@ -27,7 +27,7 @@ static_assert(sizeof(UserSelectionConfig) == 0xA0, "UserSelectionConfig has inco | |||
| 27 | 27 | ||
| 28 | struct UserSelectionOutput { | 28 | struct UserSelectionOutput { |
| 29 | u64 result; | 29 | u64 result; |
| 30 | Common::NewUUID uuid_selected; | 30 | Common::UUID uuid_selected; |
| 31 | }; | 31 | }; |
| 32 | static_assert(sizeof(UserSelectionOutput) == 0x18, "UserSelectionOutput has incorrect size."); | 32 | static_assert(sizeof(UserSelectionOutput) == 0x18, "UserSelectionOutput has incorrect size."); |
| 33 | 33 | ||
| @@ -44,7 +44,7 @@ public: | |||
| 44 | void ExecuteInteractive() override; | 44 | void ExecuteInteractive() override; |
| 45 | void Execute() override; | 45 | void Execute() override; |
| 46 | 46 | ||
| 47 | void SelectionComplete(std::optional<Common::NewUUID> uuid); | 47 | void SelectionComplete(std::optional<Common::UUID> uuid); |
| 48 | 48 | ||
| 49 | private: | 49 | private: |
| 50 | const Core::Frontend::ProfileSelectApplet& frontend; | 50 | const Core::Frontend::ProfileSelectApplet& frontend; |
diff --git a/src/core/hle/service/friend/friend.cpp b/src/core/hle/service/friend/friend.cpp index 3c621f7f0..79cd3acbb 100644 --- a/src/core/hle/service/friend/friend.cpp +++ b/src/core/hle/service/friend/friend.cpp | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | 4 | ||
| 5 | #include <queue> | 5 | #include <queue> |
| 6 | #include "common/logging/log.h" | 6 | #include "common/logging/log.h" |
| 7 | #include "common/new_uuid.h" | 7 | #include "common/uuid.h" |
| 8 | #include "core/core.h" | 8 | #include "core/core.h" |
| 9 | #include "core/hle/ipc_helpers.h" | 9 | #include "core/hle/ipc_helpers.h" |
| 10 | #include "core/hle/kernel/k_event.h" | 10 | #include "core/hle/kernel/k_event.h" |
| @@ -170,7 +170,7 @@ private: | |||
| 170 | void GetPlayHistoryRegistrationKey(Kernel::HLERequestContext& ctx) { | 170 | void GetPlayHistoryRegistrationKey(Kernel::HLERequestContext& ctx) { |
| 171 | IPC::RequestParser rp{ctx}; | 171 | IPC::RequestParser rp{ctx}; |
| 172 | const auto local_play = rp.Pop<bool>(); | 172 | const auto local_play = rp.Pop<bool>(); |
| 173 | const auto uuid = rp.PopRaw<Common::NewUUID>(); | 173 | const auto uuid = rp.PopRaw<Common::UUID>(); |
| 174 | 174 | ||
| 175 | LOG_WARNING(Service_Friend, "(STUBBED) called, local_play={}, uuid=0x{}", local_play, | 175 | LOG_WARNING(Service_Friend, "(STUBBED) called, local_play={}, uuid=0x{}", local_play, |
| 176 | uuid.RawString()); | 176 | uuid.RawString()); |
| @@ -182,7 +182,7 @@ private: | |||
| 182 | void GetFriendList(Kernel::HLERequestContext& ctx) { | 182 | void GetFriendList(Kernel::HLERequestContext& ctx) { |
| 183 | IPC::RequestParser rp{ctx}; | 183 | IPC::RequestParser rp{ctx}; |
| 184 | const auto friend_offset = rp.Pop<u32>(); | 184 | const auto friend_offset = rp.Pop<u32>(); |
| 185 | const auto uuid = rp.PopRaw<Common::NewUUID>(); | 185 | const auto uuid = rp.PopRaw<Common::UUID>(); |
| 186 | [[maybe_unused]] const auto filter = rp.PopRaw<SizedFriendFilter>(); | 186 | [[maybe_unused]] const auto filter = rp.PopRaw<SizedFriendFilter>(); |
| 187 | const auto pid = rp.Pop<u64>(); | 187 | const auto pid = rp.Pop<u64>(); |
| 188 | LOG_WARNING(Service_Friend, "(STUBBED) called, offset={}, uuid=0x{}, pid={}", friend_offset, | 188 | LOG_WARNING(Service_Friend, "(STUBBED) called, offset={}, uuid=0x{}, pid={}", friend_offset, |
| @@ -202,7 +202,7 @@ private: | |||
| 202 | 202 | ||
| 203 | class INotificationService final : public ServiceFramework<INotificationService> { | 203 | class INotificationService final : public ServiceFramework<INotificationService> { |
| 204 | public: | 204 | public: |
| 205 | explicit INotificationService(Core::System& system_, Common::NewUUID uuid_) | 205 | explicit INotificationService(Core::System& system_, Common::UUID uuid_) |
| 206 | : ServiceFramework{system_, "INotificationService"}, uuid{uuid_}, | 206 | : ServiceFramework{system_, "INotificationService"}, uuid{uuid_}, |
| 207 | service_context{system_, "INotificationService"} { | 207 | service_context{system_, "INotificationService"} { |
| 208 | // clang-format off | 208 | // clang-format off |
| @@ -293,7 +293,7 @@ private: | |||
| 293 | bool has_received_friend_request; | 293 | bool has_received_friend_request; |
| 294 | }; | 294 | }; |
| 295 | 295 | ||
| 296 | Common::NewUUID uuid; | 296 | Common::UUID uuid; |
| 297 | KernelHelpers::ServiceContext service_context; | 297 | KernelHelpers::ServiceContext service_context; |
| 298 | 298 | ||
| 299 | Kernel::KEvent* notification_event; | 299 | Kernel::KEvent* notification_event; |
| @@ -310,7 +310,7 @@ void Module::Interface::CreateFriendService(Kernel::HLERequestContext& ctx) { | |||
| 310 | 310 | ||
| 311 | void Module::Interface::CreateNotificationService(Kernel::HLERequestContext& ctx) { | 311 | void Module::Interface::CreateNotificationService(Kernel::HLERequestContext& ctx) { |
| 312 | IPC::RequestParser rp{ctx}; | 312 | IPC::RequestParser rp{ctx}; |
| 313 | auto uuid = rp.PopRaw<Common::NewUUID>(); | 313 | auto uuid = rp.PopRaw<Common::UUID>(); |
| 314 | 314 | ||
| 315 | LOG_DEBUG(Service_Friend, "called, uuid=0x{}", uuid.RawString()); | 315 | LOG_DEBUG(Service_Friend, "called, uuid=0x{}", uuid.RawString()); |
| 316 | 316 | ||
diff --git a/src/core/hle/service/mii/mii_manager.cpp b/src/core/hle/service/mii/mii_manager.cpp index aa1a9a6c7..0a57c3cde 100644 --- a/src/core/hle/service/mii/mii_manager.cpp +++ b/src/core/hle/service/mii/mii_manager.cpp | |||
| @@ -131,8 +131,7 @@ T GetRandomValue(T max) { | |||
| 131 | return GetRandomValue<T>({}, max); | 131 | return GetRandomValue<T>({}, max); |
| 132 | } | 132 | } |
| 133 | 133 | ||
| 134 | MiiStoreData BuildRandomStoreData(Age age, Gender gender, Race race, | 134 | MiiStoreData BuildRandomStoreData(Age age, Gender gender, Race race, const Common::UUID& user_id) { |
| 135 | const Common::NewUUID& user_id) { | ||
| 136 | MiiStoreBitFields bf{}; | 135 | MiiStoreBitFields bf{}; |
| 137 | 136 | ||
| 138 | if (gender == Gender::All) { | 137 | if (gender == Gender::All) { |
| @@ -311,7 +310,7 @@ MiiStoreData BuildRandomStoreData(Age age, Gender gender, Race race, | |||
| 311 | return {DefaultMiiName, bf, user_id}; | 310 | return {DefaultMiiName, bf, user_id}; |
| 312 | } | 311 | } |
| 313 | 312 | ||
| 314 | MiiStoreData BuildDefaultStoreData(const DefaultMii& info, const Common::NewUUID& user_id) { | 313 | MiiStoreData BuildDefaultStoreData(const DefaultMii& info, const Common::UUID& user_id) { |
| 315 | MiiStoreBitFields bf{}; | 314 | MiiStoreBitFields bf{}; |
| 316 | 315 | ||
| 317 | bf.font_region.Assign(info.font_region); | 316 | bf.font_region.Assign(info.font_region); |
| @@ -372,13 +371,13 @@ MiiStoreData BuildDefaultStoreData(const DefaultMii& info, const Common::NewUUID | |||
| 372 | MiiStoreData::MiiStoreData() = default; | 371 | MiiStoreData::MiiStoreData() = default; |
| 373 | 372 | ||
| 374 | MiiStoreData::MiiStoreData(const MiiStoreData::Name& name, const MiiStoreBitFields& bit_fields, | 373 | MiiStoreData::MiiStoreData(const MiiStoreData::Name& name, const MiiStoreBitFields& bit_fields, |
| 375 | const Common::NewUUID& user_id) { | 374 | const Common::UUID& user_id) { |
| 376 | data.name = name; | 375 | data.name = name; |
| 377 | data.uuid = Common::NewUUID::MakeRandomRFC4122V4(); | 376 | data.uuid = Common::UUID::MakeRandomRFC4122V4(); |
| 378 | 377 | ||
| 379 | std::memcpy(data.data.data(), &bit_fields, sizeof(MiiStoreBitFields)); | 378 | std::memcpy(data.data.data(), &bit_fields, sizeof(MiiStoreBitFields)); |
| 380 | data_crc = GenerateCrc16(data.data.data(), sizeof(data)); | 379 | data_crc = GenerateCrc16(data.data.data(), sizeof(data)); |
| 381 | device_crc = GenerateCrc16(&user_id, sizeof(Common::NewUUID)); | 380 | device_crc = GenerateCrc16(&user_id, sizeof(Common::UUID)); |
| 382 | } | 381 | } |
| 383 | 382 | ||
| 384 | MiiManager::MiiManager() : user_id{Service::Account::ProfileManager().GetLastOpenedUser()} {} | 383 | MiiManager::MiiManager() : user_id{Service::Account::ProfileManager().GetLastOpenedUser()} {} |
diff --git a/src/core/hle/service/mii/mii_manager.h b/src/core/hle/service/mii/mii_manager.h index 580a64fc9..6999d15b1 100644 --- a/src/core/hle/service/mii/mii_manager.h +++ b/src/core/hle/service/mii/mii_manager.h | |||
| @@ -8,7 +8,7 @@ | |||
| 8 | #include <vector> | 8 | #include <vector> |
| 9 | #include "common/bit_field.h" | 9 | #include "common/bit_field.h" |
| 10 | #include "common/common_funcs.h" | 10 | #include "common/common_funcs.h" |
| 11 | #include "common/new_uuid.h" | 11 | #include "common/uuid.h" |
| 12 | #include "core/hle/result.h" | 12 | #include "core/hle/result.h" |
| 13 | #include "core/hle/service/mii/types.h" | 13 | #include "core/hle/service/mii/types.h" |
| 14 | 14 | ||
| @@ -29,7 +29,7 @@ enum class SourceFlag : u32 { | |||
| 29 | DECLARE_ENUM_FLAG_OPERATORS(SourceFlag); | 29 | DECLARE_ENUM_FLAG_OPERATORS(SourceFlag); |
| 30 | 30 | ||
| 31 | struct MiiInfo { | 31 | struct MiiInfo { |
| 32 | Common::NewUUID uuid; | 32 | Common::UUID uuid; |
| 33 | std::array<char16_t, 11> name; | 33 | std::array<char16_t, 11> name; |
| 34 | u8 font_region; | 34 | u8 font_region; |
| 35 | u8 favorite_color; | 35 | u8 favorite_color; |
| @@ -192,7 +192,7 @@ struct MiiStoreData { | |||
| 192 | 192 | ||
| 193 | MiiStoreData(); | 193 | MiiStoreData(); |
| 194 | MiiStoreData(const Name& name, const MiiStoreBitFields& bit_fields, | 194 | MiiStoreData(const Name& name, const MiiStoreBitFields& bit_fields, |
| 195 | const Common::NewUUID& user_id); | 195 | const Common::UUID& user_id); |
| 196 | 196 | ||
| 197 | // This corresponds to the above structure MiiStoreBitFields. I did it like this because the | 197 | // This corresponds to the above structure MiiStoreBitFields. I did it like this because the |
| 198 | // BitField<> type makes this (and any thing that contains it) not trivially copyable, which is | 198 | // BitField<> type makes this (and any thing that contains it) not trivially copyable, which is |
| @@ -202,7 +202,7 @@ struct MiiStoreData { | |||
| 202 | static_assert(sizeof(MiiStoreBitFields) == sizeof(data), "data field has incorrect size."); | 202 | static_assert(sizeof(MiiStoreBitFields) == sizeof(data), "data field has incorrect size."); |
| 203 | 203 | ||
| 204 | Name name{}; | 204 | Name name{}; |
| 205 | Common::NewUUID uuid{}; | 205 | Common::UUID uuid{}; |
| 206 | } data; | 206 | } data; |
| 207 | 207 | ||
| 208 | u16 data_crc{}; | 208 | u16 data_crc{}; |
| @@ -326,7 +326,7 @@ public: | |||
| 326 | ResultCode GetIndex(const MiiInfo& info, u32& index); | 326 | ResultCode GetIndex(const MiiInfo& info, u32& index); |
| 327 | 327 | ||
| 328 | private: | 328 | private: |
| 329 | const Common::NewUUID user_id{}; | 329 | const Common::UUID user_id{}; |
| 330 | u64 update_counter{}; | 330 | u64 update_counter{}; |
| 331 | }; | 331 | }; |
| 332 | 332 | ||
diff --git a/src/core/hle/service/ns/pdm_qry.cpp b/src/core/hle/service/ns/pdm_qry.cpp index 3eda444d2..36ce46353 100644 --- a/src/core/hle/service/ns/pdm_qry.cpp +++ b/src/core/hle/service/ns/pdm_qry.cpp | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | #include <memory> | 5 | #include <memory> |
| 6 | 6 | ||
| 7 | #include "common/logging/log.h" | 7 | #include "common/logging/log.h" |
| 8 | #include "common/new_uuid.h" | 8 | #include "common/uuid.h" |
| 9 | #include "core/hle/ipc_helpers.h" | 9 | #include "core/hle/ipc_helpers.h" |
| 10 | #include "core/hle/service/ns/pdm_qry.h" | 10 | #include "core/hle/service/ns/pdm_qry.h" |
| 11 | #include "core/hle/service/service.h" | 11 | #include "core/hle/service/service.h" |
| @@ -49,7 +49,7 @@ void PDM_QRY::QueryPlayStatisticsByApplicationIdAndUserAccountId(Kernel::HLERequ | |||
| 49 | const auto unknown = rp.Pop<bool>(); | 49 | const auto unknown = rp.Pop<bool>(); |
| 50 | rp.Pop<u8>(); // Padding | 50 | rp.Pop<u8>(); // Padding |
| 51 | const auto application_id = rp.Pop<u64>(); | 51 | const auto application_id = rp.Pop<u64>(); |
| 52 | const auto user_account_uid = rp.PopRaw<Common::NewUUID>(); | 52 | const auto user_account_uid = rp.PopRaw<Common::UUID>(); |
| 53 | 53 | ||
| 54 | // TODO(German77): Read statistics of the game | 54 | // TODO(German77): Read statistics of the game |
| 55 | PlayStatistics statistics{ | 55 | PlayStatistics statistics{ |
diff --git a/src/core/hle/service/time/clock_types.h b/src/core/hle/service/time/clock_types.h index 23d6c859b..d0cacb80c 100644 --- a/src/core/hle/service/time/clock_types.h +++ b/src/core/hle/service/time/clock_types.h | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | 6 | ||
| 7 | #include "common/common_funcs.h" | 7 | #include "common/common_funcs.h" |
| 8 | #include "common/common_types.h" | 8 | #include "common/common_types.h" |
| 9 | #include "common/new_uuid.h" | 9 | #include "common/uuid.h" |
| 10 | #include "core/hle/service/time/errors.h" | 10 | #include "core/hle/service/time/errors.h" |
| 11 | #include "core/hle/service/time/time_zone_types.h" | 11 | #include "core/hle/service/time/time_zone_types.h" |
| 12 | 12 | ||
| @@ -21,7 +21,7 @@ enum class TimeType : u8 { | |||
| 21 | /// https://switchbrew.org/wiki/Glue_services#SteadyClockTimePoint | 21 | /// https://switchbrew.org/wiki/Glue_services#SteadyClockTimePoint |
| 22 | struct SteadyClockTimePoint { | 22 | struct SteadyClockTimePoint { |
| 23 | s64 time_point; | 23 | s64 time_point; |
| 24 | Common::NewUUID clock_source_id; | 24 | Common::UUID clock_source_id; |
| 25 | 25 | ||
| 26 | ResultCode GetSpanBetween(SteadyClockTimePoint other, s64& span) const { | 26 | ResultCode GetSpanBetween(SteadyClockTimePoint other, s64& span) const { |
| 27 | span = 0; | 27 | span = 0; |
| @@ -36,7 +36,7 @@ struct SteadyClockTimePoint { | |||
| 36 | } | 36 | } |
| 37 | 37 | ||
| 38 | static SteadyClockTimePoint GetRandom() { | 38 | static SteadyClockTimePoint GetRandom() { |
| 39 | return {0, Common::NewUUID::MakeRandom()}; | 39 | return {0, Common::UUID::MakeRandom()}; |
| 40 | } | 40 | } |
| 41 | }; | 41 | }; |
| 42 | static_assert(sizeof(SteadyClockTimePoint) == 0x18, "SteadyClockTimePoint is incorrect size"); | 42 | static_assert(sizeof(SteadyClockTimePoint) == 0x18, "SteadyClockTimePoint is incorrect size"); |
| @@ -45,7 +45,7 @@ static_assert(std::is_trivially_copyable_v<SteadyClockTimePoint>, | |||
| 45 | 45 | ||
| 46 | struct SteadyClockContext { | 46 | struct SteadyClockContext { |
| 47 | u64 internal_offset; | 47 | u64 internal_offset; |
| 48 | Common::NewUUID steady_time_point; | 48 | Common::UUID steady_time_point; |
| 49 | }; | 49 | }; |
| 50 | static_assert(sizeof(SteadyClockContext) == 0x18, "SteadyClockContext is incorrect size"); | 50 | static_assert(sizeof(SteadyClockContext) == 0x18, "SteadyClockContext is incorrect size"); |
| 51 | static_assert(std::is_trivially_copyable_v<SteadyClockContext>, | 51 | static_assert(std::is_trivially_copyable_v<SteadyClockContext>, |
diff --git a/src/core/hle/service/time/steady_clock_core.h b/src/core/hle/service/time/steady_clock_core.h index dfc9fade4..5ee2c0e0a 100644 --- a/src/core/hle/service/time/steady_clock_core.h +++ b/src/core/hle/service/time/steady_clock_core.h | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | 4 | ||
| 5 | #pragma once | 5 | #pragma once |
| 6 | 6 | ||
| 7 | #include "common/new_uuid.h" | 7 | #include "common/uuid.h" |
| 8 | #include "core/hle/service/time/clock_types.h" | 8 | #include "core/hle/service/time/clock_types.h" |
| 9 | 9 | ||
| 10 | namespace Core { | 10 | namespace Core { |
| @@ -18,11 +18,11 @@ public: | |||
| 18 | SteadyClockCore() = default; | 18 | SteadyClockCore() = default; |
| 19 | virtual ~SteadyClockCore() = default; | 19 | virtual ~SteadyClockCore() = default; |
| 20 | 20 | ||
| 21 | const Common::NewUUID& GetClockSourceId() const { | 21 | const Common::UUID& GetClockSourceId() const { |
| 22 | return clock_source_id; | 22 | return clock_source_id; |
| 23 | } | 23 | } |
| 24 | 24 | ||
| 25 | void SetClockSourceId(const Common::NewUUID& value) { | 25 | void SetClockSourceId(const Common::UUID& value) { |
| 26 | clock_source_id = value; | 26 | clock_source_id = value; |
| 27 | } | 27 | } |
| 28 | 28 | ||
| @@ -49,7 +49,7 @@ public: | |||
| 49 | } | 49 | } |
| 50 | 50 | ||
| 51 | private: | 51 | private: |
| 52 | Common::NewUUID clock_source_id{Common::NewUUID::MakeRandom()}; | 52 | Common::UUID clock_source_id{Common::UUID::MakeRandom()}; |
| 53 | bool is_initialized{}; | 53 | bool is_initialized{}; |
| 54 | }; | 54 | }; |
| 55 | 55 | ||
diff --git a/src/core/hle/service/time/time_manager.cpp b/src/core/hle/service/time/time_manager.cpp index 15a2d99e8..00f1ae8cf 100644 --- a/src/core/hle/service/time/time_manager.cpp +++ b/src/core/hle/service/time/time_manager.cpp | |||
| @@ -45,7 +45,7 @@ struct TimeManager::Impl final { | |||
| 45 | time_zone_content_manager{system} { | 45 | time_zone_content_manager{system} { |
| 46 | 46 | ||
| 47 | const auto system_time{Clock::TimeSpanType::FromSeconds(GetExternalRtcValue())}; | 47 | const auto system_time{Clock::TimeSpanType::FromSeconds(GetExternalRtcValue())}; |
| 48 | SetupStandardSteadyClock(system, Common::NewUUID::MakeRandom(), system_time, {}, {}); | 48 | SetupStandardSteadyClock(system, Common::UUID::MakeRandom(), system_time, {}, {}); |
| 49 | SetupStandardLocalSystemClock(system, {}, system_time.ToSeconds()); | 49 | SetupStandardLocalSystemClock(system, {}, system_time.ToSeconds()); |
| 50 | 50 | ||
| 51 | Clock::SystemClockContext clock_context{}; | 51 | Clock::SystemClockContext clock_context{}; |
| @@ -132,7 +132,7 @@ struct TimeManager::Impl final { | |||
| 132 | return 0; | 132 | return 0; |
| 133 | } | 133 | } |
| 134 | 134 | ||
| 135 | void SetupStandardSteadyClock(Core::System& system_, Common::NewUUID clock_source_id, | 135 | void SetupStandardSteadyClock(Core::System& system_, Common::UUID clock_source_id, |
| 136 | Clock::TimeSpanType setup_value, | 136 | Clock::TimeSpanType setup_value, |
| 137 | Clock::TimeSpanType internal_offset, bool is_rtc_reset_detected) { | 137 | Clock::TimeSpanType internal_offset, bool is_rtc_reset_detected) { |
| 138 | standard_steady_clock_core.SetClockSourceId(clock_source_id); | 138 | standard_steady_clock_core.SetClockSourceId(clock_source_id); |
diff --git a/src/core/hle/service/time/time_sharedmemory.cpp b/src/core/hle/service/time/time_sharedmemory.cpp index ac31cd9ca..ed9f75ed6 100644 --- a/src/core/hle/service/time/time_sharedmemory.cpp +++ b/src/core/hle/service/time/time_sharedmemory.cpp | |||
| @@ -20,7 +20,7 @@ SharedMemory::SharedMemory(Core::System& system_) : system(system_) { | |||
| 20 | 20 | ||
| 21 | SharedMemory::~SharedMemory() = default; | 21 | SharedMemory::~SharedMemory() = default; |
| 22 | 22 | ||
| 23 | void SharedMemory::SetupStandardSteadyClock(const Common::NewUUID& clock_source_id, | 23 | void SharedMemory::SetupStandardSteadyClock(const Common::UUID& clock_source_id, |
| 24 | Clock::TimeSpanType current_time_point) { | 24 | Clock::TimeSpanType current_time_point) { |
| 25 | const Clock::TimeSpanType ticks_time_span{Clock::TimeSpanType::FromTicks( | 25 | const Clock::TimeSpanType ticks_time_span{Clock::TimeSpanType::FromTicks( |
| 26 | system.CoreTiming().GetClockTicks(), Core::Hardware::CNTFREQ)}; | 26 | system.CoreTiming().GetClockTicks(), Core::Hardware::CNTFREQ)}; |
diff --git a/src/core/hle/service/time/time_sharedmemory.h b/src/core/hle/service/time/time_sharedmemory.h index 4063ce4e0..9307ea795 100644 --- a/src/core/hle/service/time/time_sharedmemory.h +++ b/src/core/hle/service/time/time_sharedmemory.h | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | #pragma once | 5 | #pragma once |
| 6 | 6 | ||
| 7 | #include "common/common_types.h" | 7 | #include "common/common_types.h" |
| 8 | #include "common/new_uuid.h" | 8 | #include "common/uuid.h" |
| 9 | #include "core/hle/kernel/k_shared_memory.h" | 9 | #include "core/hle/kernel/k_shared_memory.h" |
| 10 | #include "core/hle/service/time/clock_types.h" | 10 | #include "core/hle/service/time/clock_types.h" |
| 11 | 11 | ||
| @@ -52,7 +52,7 @@ public: | |||
| 52 | }; | 52 | }; |
| 53 | static_assert(sizeof(Format) == 0xd8, "Format is an invalid size"); | 53 | static_assert(sizeof(Format) == 0xd8, "Format is an invalid size"); |
| 54 | 54 | ||
| 55 | void SetupStandardSteadyClock(const Common::NewUUID& clock_source_id, | 55 | void SetupStandardSteadyClock(const Common::UUID& clock_source_id, |
| 56 | Clock::TimeSpanType current_time_point); | 56 | Clock::TimeSpanType current_time_point); |
| 57 | void UpdateLocalSystemClockContext(const Clock::SystemClockContext& context); | 57 | void UpdateLocalSystemClockContext(const Clock::SystemClockContext& context); |
| 58 | void UpdateNetworkSystemClockContext(const Clock::SystemClockContext& context); | 58 | void UpdateNetworkSystemClockContext(const Clock::SystemClockContext& context); |