mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-07-23 22:35:45 +00:00
input_profiles: Implement input profiles
This commit is contained in:
parent
ad9a909bc7
commit
c3a9d5de40
13 changed files with 506 additions and 127 deletions
32
src/yuzu/configuration/input_profiles.h
Normal file
32
src/yuzu/configuration/input_profiles.h
Normal file
|
@ -0,0 +1,32 @@
|
|||
// Copyright 2020 yuzu Emulator Project
|
||||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include <unordered_map>
|
||||
|
||||
class Config;
|
||||
|
||||
class InputProfiles {
|
||||
|
||||
public:
|
||||
explicit InputProfiles();
|
||||
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;
|
||||
|
||||
std::unordered_map<std::string, std::unique_ptr<Config>> map_profiles;
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue