mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2025-02-23 14:25:38 +00:00
PostProcessing: Add Config::GetShaderOptions()
This commit is contained in:
parent
c90de025bf
commit
27162e34a0
|
@ -271,6 +271,18 @@ std::vector<PostProcessing::ShaderOption> PostProcessing::Config::GetStageOption
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::vector<PostProcessing::ShaderOption> PostProcessing::Config::GetShaderOptions(const std::string& shader_name,
|
||||||
|
Error* error)
|
||||||
|
{
|
||||||
|
std::vector<PostProcessing::ShaderOption> ret;
|
||||||
|
std::unique_ptr<Shader> shader = TryLoadingShader(shader_name, true, error);
|
||||||
|
if (!shader)
|
||||||
|
return ret;
|
||||||
|
|
||||||
|
ret = shader->TakeOptions();
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
bool PostProcessing::Config::AddStage(SettingsInterface& si, const std::string& shader_name, Error* error)
|
bool PostProcessing::Config::AddStage(SettingsInterface& si, const std::string& shader_name, Error* error)
|
||||||
{
|
{
|
||||||
std::unique_ptr<Shader> shader = TryLoadingShader(shader_name, true, error);
|
std::unique_ptr<Shader> shader = TryLoadingShader(shader_name, true, error);
|
||||||
|
|
|
@ -93,6 +93,7 @@ namespace Config {
|
||||||
u32 GetStageCount(const SettingsInterface& si);
|
u32 GetStageCount(const SettingsInterface& si);
|
||||||
std::string GetStageShaderName(const SettingsInterface& si, u32 index);
|
std::string GetStageShaderName(const SettingsInterface& si, u32 index);
|
||||||
std::vector<ShaderOption> GetStageOptions(const SettingsInterface& si, u32 index);
|
std::vector<ShaderOption> GetStageOptions(const SettingsInterface& si, u32 index);
|
||||||
|
std::vector<ShaderOption> GetShaderOptions(const std::string& shader_name, Error* error);
|
||||||
|
|
||||||
bool AddStage(SettingsInterface& si, const std::string& shader_name, Error* error);
|
bool AddStage(SettingsInterface& si, const std::string& shader_name, Error* error);
|
||||||
void RemoveStage(SettingsInterface& si, u32 index);
|
void RemoveStage(SettingsInterface& si, u32 index);
|
||||||
|
|
Loading…
Reference in a new issue