2026-02-10 03:34:07 +01:00
|
|
|
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
2025-09-15 17:21:18 +02:00
|
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
|
|
2022-04-23 04:59:50 -04:00
|
|
|
// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project
|
|
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
2020-09-23 09:52:25 -04:00
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <string>
|
2026-02-10 03:34:07 +01:00
|
|
|
#include <ankerl/unordered_dense.h>
|
2020-09-23 09:52:25 -04:00
|
|
|
|
2025-10-15 05:05:03 +02:00
|
|
|
#include "qt_common/config/qt_config.h"
|
2023-11-12 02:03:01 -05:00
|
|
|
|
2021-09-02 21:40:55 -04:00
|
|
|
namespace Core {
|
|
|
|
|
class System;
|
|
|
|
|
}
|
|
|
|
|
|
2020-09-23 09:52:25 -04:00
|
|
|
class Config;
|
|
|
|
|
|
|
|
|
|
class InputProfiles {
|
|
|
|
|
|
|
|
|
|
public:
|
2022-07-10 11:29:10 -04:00
|
|
|
explicit InputProfiles();
|
2020-09-23 09:52:25 -04:00
|
|
|
virtual ~InputProfiles();
|
|
|
|
|
|
|
|
|
|
std::vector<std::string> GetInputProfileNames();
|
|
|
|
|
|
|
|
|
|
static bool IsProfileNameValid(std::string_view profile_name);
|
|
|
|
|
|
|
|
|
|
bool CreateProfile(const std::string& profile_name, std::size_t player_index);
|
|
|
|
|
bool DeleteProfile(const std::string& profile_name);
|
|
|
|
|
bool LoadProfile(const std::string& profile_name, std::size_t player_index);
|
|
|
|
|
bool SaveProfile(const std::string& profile_name, std::size_t player_index);
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
bool ProfileExistsInMap(const std::string& profile_name) const;
|
|
|
|
|
|
2026-02-10 03:34:07 +01:00
|
|
|
ankerl::unordered_dense::map<std::string, std::unique_ptr<QtConfig>> map_profiles;
|
2020-09-23 09:52:25 -04:00
|
|
|
};
|