2022-04-23 04:59:50 -04:00
|
|
|
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
|
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
2018-11-22 20:58:51 -05:00
|
|
|
|
2021-04-14 16:07:40 -07:00
|
|
|
#include "common/settings.h"
|
2018-11-22 20:58:51 -05:00
|
|
|
#include "core/frontend/applets/profile_select.h"
|
2019-01-10 21:53:07 -05:00
|
|
|
#include "core/hle/service/acc/profile_manager.h"
|
2018-11-22 20:58:51 -05:00
|
|
|
|
|
|
|
namespace Core::Frontend {
|
|
|
|
|
|
|
|
ProfileSelectApplet::~ProfileSelectApplet() = default;
|
|
|
|
|
2023-03-25 13:29:08 -04:00
|
|
|
void DefaultProfileSelectApplet::Close() const {}
|
|
|
|
|
2023-03-28 20:55:06 -06:00
|
|
|
void DefaultProfileSelectApplet::SelectProfile(SelectProfileCallback callback,
|
|
|
|
const ProfileSelectParameters& parameters) const {
|
2018-11-22 20:58:51 -05:00
|
|
|
Service::Account::ProfileManager manager;
|
2022-02-05 12:35:39 -05:00
|
|
|
callback(manager.GetUser(Settings::values.current_user.GetValue()).value_or(Common::UUID{}));
|
2018-11-22 20:58:51 -05:00
|
|
|
LOG_INFO(Service_ACC, "called, selecting current user instead of prompting...");
|
|
|
|
}
|
|
|
|
|
|
|
|
} // namespace Core::Frontend
|