mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2026-04-03 11:37:52 -06:00
* using new emulator_settings * the default user is now just player one * transfer install, addon dirs * fix load custom config issue --------- Co-authored-by: kalaposfos13 <153381648+kalaposfos13@users.noreply.github.com>
46 lines
1.0 KiB
C++
46 lines
1.0 KiB
C++
// SPDX-FileCopyrightText: Copyright 2026 shadPS4 Emulator Project
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
#pragma once
|
|
|
|
#include <filesystem>
|
|
#include <functional>
|
|
#include <memory>
|
|
#include <mutex>
|
|
#include <sstream>
|
|
#include <string>
|
|
#include <vector>
|
|
#include <nlohmann/json.hpp>
|
|
#include "common/logging/log.h"
|
|
#include "common/types.h"
|
|
#include "core/user_manager.h"
|
|
|
|
#define UserSettings (*UserSettingsImpl::GetInstance())
|
|
|
|
#define UserManagement UserSettings.GetUserManager()
|
|
|
|
// -------------------------------
|
|
// User settings
|
|
// -------------------------------
|
|
|
|
class UserSettingsImpl {
|
|
public:
|
|
UserSettingsImpl();
|
|
~UserSettingsImpl();
|
|
|
|
UserManager& GetUserManager() {
|
|
return m_userManager;
|
|
}
|
|
|
|
bool Save() const;
|
|
bool Load();
|
|
|
|
static std::shared_ptr<UserSettingsImpl> GetInstance();
|
|
static void SetInstance(std::shared_ptr<UserSettingsImpl> instance);
|
|
|
|
private:
|
|
UserManager m_userManager;
|
|
|
|
static std::shared_ptr<UserSettingsImpl> s_instance;
|
|
static std::mutex s_mutex;
|
|
}; |