Permalink
Browse files

Merge pull request #6930 from lioncash/post

VideoCommon/PostProcessing: Minor changes
  • Loading branch information...
leoetlino committed May 21, 2018
2 parents db5c2ff + c4d27cc commit 32c4f3d15806a11eb31d3e09d8c4ecc4c055a49b
Showing with 12 additions and 7 deletions.
  1. +4 −0 Source/Core/VideoCommon/PostProcessing.cpp
  2. +8 −7 Source/Core/VideoCommon/PostProcessing.h
@@ -63,6 +63,10 @@ std::vector<std::string> PostProcessingShaderImplementation::GetAnaglyphShaderLi
return {};
}
PostProcessingShaderConfiguration::PostProcessingShaderConfiguration() = default;
PostProcessingShaderConfiguration::~PostProcessingShaderConfiguration() = default;
std::string PostProcessingShaderConfiguration::LoadShader(std::string shader)
{
// Load the shader from the configuration if there isn't one sent to us.
@@ -46,20 +46,21 @@ class PostProcessingShaderConfiguration
bool m_dirty;
};
typedef std::map<std::string, ConfigurationOption> ConfigMap;
using ConfigMap = std::map<std::string, ConfigurationOption>;
PostProcessingShaderConfiguration();
virtual ~PostProcessingShaderConfiguration();
PostProcessingShaderConfiguration() : m_current_shader("") {}
virtual ~PostProcessingShaderConfiguration() {}
// Loads the configuration with a shader
// If the argument is "" the class will load the shader from the g_activeConfig option.
// Returns the loaded shader source from file
std::string LoadShader(std::string shader = "");
void SaveOptionsConfiguration();
void ReloadShader();
std::string GetShader() { return m_current_shader; }
bool IsDirty() { return m_any_options_dirty; }
const std::string& GetShader() const { return m_current_shader; }
bool IsDirty() const { return m_any_options_dirty; }
void SetDirty(bool dirty) { m_any_options_dirty = dirty; }
bool HasOptions() { return m_options.size() > 0; }
bool HasOptions() const { return m_options.size() > 0; }
const ConfigMap& GetOptions() const { return m_options; }
ConfigMap& GetOptions() { return m_options; }
const ConfigurationOption& GetOption(const std::string& option) { return m_options[option]; }
@@ -69,7 +70,7 @@ class PostProcessingShaderConfiguration
void SetOptionb(const std::string& option, bool value);
private:
bool m_any_options_dirty;
bool m_any_options_dirty = false;
std::string m_current_shader;
ConfigMap m_options;

0 comments on commit 32c4f3d

Please sign in to comment.