2019-08-17 19:40:58 +00:00
|
|
|
// Copyright 2019 Dolphin Emulator Project
|
|
|
|
// Licensed under GPLv2+
|
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
#include <unordered_map>
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
#include "Common/CommonTypes.h"
|
|
|
|
#include "Common/IniFile.h"
|
2021-02-15 03:20:47 +00:00
|
|
|
#include "InputCommon/DynamicInputTextures/DITData.h"
|
2019-08-17 19:40:58 +00:00
|
|
|
|
2021-02-15 02:47:00 +00:00
|
|
|
namespace InputCommon::DynamicInputTextures
|
2019-08-17 19:40:58 +00:00
|
|
|
{
|
2021-02-15 02:47:00 +00:00
|
|
|
class Configuration
|
2019-08-17 19:40:58 +00:00
|
|
|
{
|
|
|
|
public:
|
2021-02-15 02:47:00 +00:00
|
|
|
explicit Configuration(const std::string& json_file);
|
|
|
|
~Configuration();
|
2021-02-27 22:41:50 +00:00
|
|
|
bool GenerateTextures(const IniFile& file,
|
|
|
|
const std::vector<std::string>& controller_names) const;
|
2019-08-17 19:40:58 +00:00
|
|
|
|
|
|
|
private:
|
2021-02-27 22:41:50 +00:00
|
|
|
bool GenerateTexture(const IniFile& file, const std::vector<std::string>& controller_names,
|
2021-02-15 03:20:47 +00:00
|
|
|
const Data& texture_data) const;
|
2019-08-17 19:40:58 +00:00
|
|
|
|
2021-02-15 03:20:47 +00:00
|
|
|
std::vector<Data> m_dynamic_input_textures;
|
2019-08-17 19:40:58 +00:00
|
|
|
std::string m_base_path;
|
|
|
|
bool m_valid = true;
|
|
|
|
};
|
2021-02-15 02:47:00 +00:00
|
|
|
} // namespace InputCommon::DynamicInputTextures
|