shadPS4/src/common/config.h

47 lines
1.2 KiB
C++

// SPDX-FileCopyrightText: Copyright 2025-2026 shadPS4 Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#include <filesystem>
#include <vector>
#include "types.h"
namespace Config {
enum class ConfigMode {
Default,
Global,
Clean,
};
void setConfigMode(ConfigMode mode);
struct GameInstallDir {
std::filesystem::path path;
bool enabled;
};
void load(const std::filesystem::path& path, bool is_game_specific = false);
void save(const std::filesystem::path& path, bool is_game_specific = false);
std::string getTrophyKey();
void setTrophyKey(std::string key);
void setUserName(const std::string& name, bool is_game_specific = false);
// TODO
std::string getUserName(int id);
std::array<std::string, 4> const getUserNames();
bool GetUseUnifiedInputConfig();
void SetUseUnifiedInputConfig(bool use);
bool GetOverrideControllerColor();
void SetOverrideControllerColor(bool enable);
int* GetControllerCustomColor();
void SetControllerCustomColor(int r, int b, int g);
void setDefaultValues(bool is_game_specific = false);
constexpr std::string_view GetDefaultGlobalConfig();
std::filesystem::path GetInputConfigFile(const std::string& game_id = "");
}; // namespace Config