mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
Merge pull request #7753 from stenzek/videocommon-all-the-things
Move a significant amount of video backend logic to VideoCommon
This commit is contained in:
@ -152,10 +152,9 @@ void EnhancementsWidget::ConnectWidgets()
|
||||
void EnhancementsWidget::LoadPPShaders()
|
||||
{
|
||||
const bool anaglyph = g_Config.stereo_mode == StereoMode::Anaglyph;
|
||||
std::vector<std::string> shaders =
|
||||
anaglyph ? PostProcessingShaderImplementation::GetAnaglyphShaderList(
|
||||
g_Config.backend_info.api_type) :
|
||||
PostProcessingShaderImplementation::GetShaderList(g_Config.backend_info.api_type);
|
||||
std::vector<std::string> shaders = anaglyph ?
|
||||
VideoCommon::PostProcessing::GetAnaglyphShaderList() :
|
||||
VideoCommon::PostProcessing::GetShaderList();
|
||||
|
||||
m_pp_effect->clear();
|
||||
|
||||
@ -187,7 +186,7 @@ void EnhancementsWidget::LoadPPShaders()
|
||||
tr("%1 doesn't support this feature.")
|
||||
.arg(tr(g_video_backend->GetDisplayName().c_str())));
|
||||
|
||||
PostProcessingShaderConfiguration pp_shader;
|
||||
VideoCommon::PostProcessingConfiguration pp_shader;
|
||||
if (selected_shader != "(off)" && supports_postprocessing)
|
||||
{
|
||||
pp_shader.LoadShader(selected_shader);
|
||||
@ -266,7 +265,7 @@ void EnhancementsWidget::SaveSettings()
|
||||
"(off)" :
|
||||
m_pp_effect->currentText().toStdString());
|
||||
|
||||
PostProcessingShaderConfiguration pp_shader;
|
||||
VideoCommon::PostProcessingConfiguration pp_shader;
|
||||
if (Config::Get(Config::GFX_ENHANCE_POST_SHADER) != "(off)")
|
||||
{
|
||||
pp_shader.LoadShader(Config::Get(Config::GFX_ENHANCE_POST_SHADER));
|
||||
|
@ -25,7 +25,7 @@
|
||||
#include "VideoCommon/RenderBase.h"
|
||||
#include "VideoCommon/VideoConfig.h"
|
||||
|
||||
using ConfigurationOption = PostProcessingShaderConfiguration::ConfigurationOption;
|
||||
using ConfigurationOption = VideoCommon::PostProcessingConfiguration::ConfigurationOption;
|
||||
using OptionType = ConfigurationOption::OptionType;
|
||||
|
||||
PostProcessingConfigWindow::PostProcessingConfigWindow(EnhancementsWidget* parent,
|
||||
@ -38,7 +38,7 @@ PostProcessingConfigWindow::PostProcessingConfigWindow(EnhancementsWidget* paren
|
||||
}
|
||||
else
|
||||
{
|
||||
m_post_processor = new PostProcessingShaderConfiguration();
|
||||
m_post_processor = new VideoCommon::PostProcessingConfiguration();
|
||||
m_post_processor->LoadShader(m_shader);
|
||||
}
|
||||
|
||||
@ -61,7 +61,8 @@ PostProcessingConfigWindow::~PostProcessingConfigWindow()
|
||||
|
||||
void PostProcessingConfigWindow::PopulateGroups()
|
||||
{
|
||||
const PostProcessingShaderConfiguration::ConfigMap& config_map = m_post_processor->GetOptions();
|
||||
const VideoCommon::PostProcessingConfiguration::ConfigMap& config_map =
|
||||
m_post_processor->GetOptions();
|
||||
|
||||
auto config_groups = std::vector<std::unique_ptr<ConfigGroup>>();
|
||||
for (const auto& it : config_map)
|
||||
|
@ -35,7 +35,7 @@ private:
|
||||
{
|
||||
public:
|
||||
explicit ConfigGroup(
|
||||
const PostProcessingShaderConfiguration::ConfigurationOption* config_option);
|
||||
const VideoCommon::PostProcessingConfiguration::ConfigurationOption* config_option);
|
||||
|
||||
const std::string& GetGUIName() const noexcept;
|
||||
const std::string& GetParent() const noexcept;
|
||||
@ -57,7 +57,7 @@ private:
|
||||
std::vector<QSlider*> m_sliders;
|
||||
std::vector<QLineEdit*> m_value_boxes;
|
||||
|
||||
const PostProcessingShaderConfiguration::ConfigurationOption* m_config_option;
|
||||
const VideoCommon::PostProcessingConfiguration::ConfigurationOption* m_config_option;
|
||||
std::vector<std::unique_ptr<ConfigGroup>> m_subgroups;
|
||||
};
|
||||
void Create();
|
||||
@ -72,7 +72,7 @@ private:
|
||||
QDialogButtonBox* m_buttons;
|
||||
|
||||
const std::string& m_shader;
|
||||
PostProcessingShaderConfiguration* m_post_processor;
|
||||
VideoCommon::PostProcessingConfiguration* m_post_processor;
|
||||
std::unordered_map<std::string, ConfigGroup*> m_config_map;
|
||||
std::vector<std::unique_ptr<ConfigGroup>> m_config_groups;
|
||||
};
|
||||
|
Reference in New Issue
Block a user