mirror of
https://github.com/yuzu-mirror/yuzu.git
synced 2024-12-26 07:54:14 +01:00
service: am: Fix GetMainAppletAvailableUsers for user creation
This commit is contained in:
parent
2954c01b47
commit
dbcc447f43
@ -329,9 +329,8 @@ bool ProfileManager::GetProfileBaseAndData(const ProfileInfo& user, ProfileBase&
|
|||||||
|
|
||||||
/// Returns if the system is allowing user registrations or not
|
/// Returns if the system is allowing user registrations or not
|
||||||
bool ProfileManager::CanSystemRegisterUser() const {
|
bool ProfileManager::CanSystemRegisterUser() const {
|
||||||
return false; // TODO(ogniK): Games shouldn't have
|
// TODO: Both games and applets can register users. Determine when this condition is not meet.
|
||||||
// access to user registration, when we
|
return true;
|
||||||
// emulate qlaunch. Update this to dynamically change.
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ProfileManager::RemoveUser(UUID uuid) {
|
bool ProfileManager::RemoveUser(UUID uuid) {
|
||||||
|
@ -284,17 +284,17 @@ Result ILibraryAppletSelfAccessor::GetCurrentApplicationId(Out<u64> out_applicat
|
|||||||
}
|
}
|
||||||
|
|
||||||
Result ILibraryAppletSelfAccessor::GetMainAppletAvailableUsers(
|
Result ILibraryAppletSelfAccessor::GetMainAppletAvailableUsers(
|
||||||
Out<bool> out_no_users_available, Out<s32> out_users_count,
|
Out<bool> out_can_select_any_user, Out<s32> out_users_count,
|
||||||
OutArray<Common::UUID, BufferAttr_HipcMapAlias> out_users) {
|
OutArray<Common::UUID, BufferAttr_HipcMapAlias> out_users) {
|
||||||
const Service::Account::ProfileManager manager{};
|
const Service::Account::ProfileManager manager{};
|
||||||
|
|
||||||
*out_no_users_available = true;
|
*out_can_select_any_user = false;
|
||||||
*out_users_count = -1;
|
*out_users_count = -1;
|
||||||
|
|
||||||
LOG_INFO(Service_AM, "called");
|
LOG_INFO(Service_AM, "called");
|
||||||
|
|
||||||
if (manager.GetUserCount() > 0) {
|
if (manager.GetUserCount() > 0) {
|
||||||
*out_no_users_available = false;
|
*out_can_select_any_user = true;
|
||||||
*out_users_count = static_cast<s32>(manager.GetUserCount());
|
*out_users_count = static_cast<s32>(manager.GetUserCount());
|
||||||
|
|
||||||
const auto users = manager.GetAllUsers();
|
const auto users = manager.GetAllUsers();
|
||||||
|
@ -71,7 +71,7 @@ private:
|
|||||||
ErrorCode error_code, InLargeData<ErrorContext, BufferAttr_HipcMapAlias> error_context);
|
ErrorCode error_code, InLargeData<ErrorContext, BufferAttr_HipcMapAlias> error_context);
|
||||||
Result GetMainAppletApplicationDesiredLanguage(Out<u64> out_desired_language);
|
Result GetMainAppletApplicationDesiredLanguage(Out<u64> out_desired_language);
|
||||||
Result GetCurrentApplicationId(Out<u64> out_application_id);
|
Result GetCurrentApplicationId(Out<u64> out_application_id);
|
||||||
Result GetMainAppletAvailableUsers(Out<bool> out_no_users_available, Out<s32> out_users_count,
|
Result GetMainAppletAvailableUsers(Out<bool> out_can_select_any_user, Out<s32> out_users_count,
|
||||||
OutArray<Common::UUID, BufferAttr_HipcMapAlias> out_users);
|
OutArray<Common::UUID, BufferAttr_HipcMapAlias> out_users);
|
||||||
Result ShouldSetGpuTimeSliceManually(Out<bool> out_should_set_gpu_time_slice_manually);
|
Result ShouldSetGpuTimeSliceManually(Out<bool> out_should_set_gpu_time_slice_manually);
|
||||||
Result Cmd160(Out<u64> out_unknown0);
|
Result Cmd160(Out<u64> out_unknown0);
|
||||||
|
Loading…
Reference in New Issue
Block a user