InputCommon: Move DynamicInputTextureConfiguration to DynamicInputTextures::Configuration
This commit is contained in:
parent
38935f2e4e
commit
28a911ae6b
|
@ -475,7 +475,7 @@
|
|||
<ClInclude Include="InputCommon\ControlReference\ControlReference.h" />
|
||||
<ClInclude Include="InputCommon\ControlReference\ExpressionParser.h" />
|
||||
<ClInclude Include="InputCommon\ControlReference\FunctionExpression.h" />
|
||||
<ClInclude Include="InputCommon\DynamicInputTextureConfiguration.h" />
|
||||
<ClInclude Include="InputCommon\DynamicInputTextures\DITConfiguration.h" />
|
||||
<ClInclude Include="InputCommon\DynamicInputTextureManager.h" />
|
||||
<ClInclude Include="InputCommon\GCAdapter.h" />
|
||||
<ClInclude Include="InputCommon\GCPadStatus.h" />
|
||||
|
@ -1041,7 +1041,7 @@
|
|||
<ClCompile Include="InputCommon\ControlReference\ControlReference.cpp" />
|
||||
<ClCompile Include="InputCommon\ControlReference\ExpressionParser.cpp" />
|
||||
<ClCompile Include="InputCommon\ControlReference\FunctionExpression.cpp" />
|
||||
<ClCompile Include="InputCommon\DynamicInputTextureConfiguration.cpp" />
|
||||
<ClCompile Include="InputCommon\DynamicInputTextures\DITConfiguration.cpp" />
|
||||
<ClCompile Include="InputCommon\DynamicInputTextureManager.cpp" />
|
||||
<ClCompile Include="InputCommon\GCAdapter.cpp" />
|
||||
<ClCompile Include="InputCommon\ImageOperations.cpp" />
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
add_library(inputcommon
|
||||
DynamicInputTextureConfiguration.cpp
|
||||
DynamicInputTextureConfiguration.h
|
||||
DynamicInputTextureManager.cpp
|
||||
DynamicInputTextureManager.h
|
||||
ImageOperations.cpp
|
||||
|
@ -64,6 +62,8 @@ add_library(inputcommon
|
|||
ControlReference/ExpressionParser.h
|
||||
ControlReference/FunctionExpression.cpp
|
||||
ControlReference/FunctionExpression.h
|
||||
DynamicInputTextures/DITConfiguration.cpp
|
||||
DynamicInputTextures/DITConfiguration.h
|
||||
)
|
||||
|
||||
target_link_libraries(inputcommon
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
#include "Core/ConfigManager.h"
|
||||
#include "Core/Core.h"
|
||||
|
||||
#include "InputCommon/DynamicInputTextureConfiguration.h"
|
||||
#include "InputCommon/DynamicInputTextures/DITConfiguration.h"
|
||||
#include "VideoCommon/HiresTextures.h"
|
||||
#include "VideoCommon/RenderBase.h"
|
||||
|
||||
|
|
|
@ -11,7 +11,10 @@
|
|||
|
||||
namespace InputCommon
|
||||
{
|
||||
class DynamicInputTextureConfiguration;
|
||||
namespace DynamicInputTextures
|
||||
{
|
||||
class Configuration;
|
||||
}
|
||||
class DynamicInputTextureManager
|
||||
{
|
||||
public:
|
||||
|
@ -21,7 +24,7 @@ public:
|
|||
void GenerateTextures(const IniFile::Section* sec, const std::string& controller_name);
|
||||
|
||||
private:
|
||||
std::vector<DynamicInputTextureConfiguration> m_configuration;
|
||||
std::vector<DynamicInputTextures::Configuration> m_configuration;
|
||||
std::string m_config_type;
|
||||
};
|
||||
} // namespace InputCommon
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
// Licensed under GPLv2+
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include "InputCommon/DynamicInputTextureConfiguration.h"
|
||||
#include "InputCommon/DynamicInputTextures/DITConfiguration.h"
|
||||
|
||||
#include <optional>
|
||||
#include <sstream>
|
||||
|
@ -30,9 +30,9 @@ std::string GetStreamAsString(std::ifstream& stream)
|
|||
}
|
||||
} // namespace
|
||||
|
||||
namespace InputCommon
|
||||
namespace InputCommon::DynamicInputTextures
|
||||
{
|
||||
DynamicInputTextureConfiguration::DynamicInputTextureConfiguration(const std::string& json_file)
|
||||
Configuration::Configuration(const std::string& json_file)
|
||||
{
|
||||
std::ifstream json_stream;
|
||||
File::OpenFStream(json_stream, json_file, std::ios_base::in);
|
||||
|
@ -247,10 +247,10 @@ DynamicInputTextureConfiguration::DynamicInputTextureConfiguration(const std::st
|
|||
}
|
||||
}
|
||||
|
||||
DynamicInputTextureConfiguration::~DynamicInputTextureConfiguration() = default;
|
||||
Configuration::~Configuration() = default;
|
||||
|
||||
bool DynamicInputTextureConfiguration::GenerateTextures(const IniFile::Section* sec,
|
||||
const std::string& controller_name) const
|
||||
bool Configuration::GenerateTextures(const IniFile::Section* sec,
|
||||
const std::string& controller_name) const
|
||||
{
|
||||
bool any_dirty = false;
|
||||
for (const auto& texture_data : m_dynamic_input_textures)
|
||||
|
@ -261,9 +261,8 @@ bool DynamicInputTextureConfiguration::GenerateTextures(const IniFile::Section*
|
|||
return any_dirty;
|
||||
}
|
||||
|
||||
bool DynamicInputTextureConfiguration::GenerateTexture(
|
||||
const IniFile::Section* sec, const std::string& controller_name,
|
||||
const DynamicInputTextureData& texture_data) const
|
||||
bool Configuration::GenerateTexture(const IniFile::Section* sec, const std::string& controller_name,
|
||||
const DynamicInputTextureData& texture_data) const
|
||||
{
|
||||
std::string device_name;
|
||||
if (!sec->Get("Device", &device_name))
|
||||
|
@ -381,4 +380,4 @@ bool DynamicInputTextureConfiguration::GenerateTexture(
|
|||
|
||||
return false;
|
||||
}
|
||||
} // namespace InputCommon
|
||||
} // namespace InputCommon::DynamicInputTextures
|
|
@ -12,13 +12,13 @@
|
|||
#include "Common/IniFile.h"
|
||||
#include "InputCommon/ImageOperations.h"
|
||||
|
||||
namespace InputCommon
|
||||
namespace InputCommon::DynamicInputTextures
|
||||
{
|
||||
class DynamicInputTextureConfiguration
|
||||
class Configuration
|
||||
{
|
||||
public:
|
||||
explicit DynamicInputTextureConfiguration(const std::string& json_file);
|
||||
~DynamicInputTextureConfiguration();
|
||||
explicit Configuration(const std::string& json_file);
|
||||
~Configuration();
|
||||
bool GenerateTextures(const IniFile::Section* sec, const std::string& controller_name) const;
|
||||
|
||||
private:
|
||||
|
@ -43,4 +43,4 @@ private:
|
|||
std::string m_base_path;
|
||||
bool m_valid = true;
|
||||
};
|
||||
} // namespace InputCommon
|
||||
} // namespace InputCommon::DynamicInputTextures
|
Loading…
Reference in New Issue