2022-04-23 20:49:07 +02:00
|
|
|
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
|
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
2020-12-28 15:15:37 +00:00
|
|
|
|
2021-04-15 04:05:28 +02:00
|
|
|
#include "common/settings.h"
|
2020-12-28 15:15:37 +00:00
|
|
|
#include "core/frontend/applets/profile_select.h"
|
|
|
|
#include "core/hle/service/acc/profile_manager.h"
|
|
|
|
|
|
|
|
namespace Core::Frontend {
|
|
|
|
|
|
|
|
ProfileSelectApplet::~ProfileSelectApplet() = default;
|
|
|
|
|
|
|
|
void DefaultProfileSelectApplet::SelectProfile(
|
|
|
|
std::function<void(std::optional<Common::UUID>)> callback) const {
|
|
|
|
Service::Account::ProfileManager manager;
|
2022-02-09 20:56:59 +01:00
|
|
|
callback(manager.GetUser(Settings::values.current_user.GetValue()).value_or(Common::UUID{}));
|
2020-12-28 15:15:37 +00:00
|
|
|
LOG_INFO(Service_ACC, "called, selecting current user instead of prompting...");
|
|
|
|
}
|
|
|
|
|
|
|
|
} // namespace Core::Frontend
|