mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-09-20 03:11:51 +02:00
Hook up Presenter's ConfigChanged function
Fixes issue with post-processing not working
This commit is contained in:
parent
9c1fe59cc9
commit
5c1b3ac61d
2 changed files with 6 additions and 2 deletions
|
@ -31,6 +31,8 @@ static float AspectToWidescreen(float aspect)
|
||||||
|
|
||||||
Presenter::Presenter()
|
Presenter::Presenter()
|
||||||
{
|
{
|
||||||
|
m_config_changed =
|
||||||
|
ConfigChangedEvent::Register([this](u32 bits) { ConfigChanged(bits); }, "Presenter");
|
||||||
}
|
}
|
||||||
|
|
||||||
Presenter::~Presenter()
|
Presenter::~Presenter()
|
||||||
|
@ -176,7 +178,7 @@ void Presenter::SetBackbuffer(SurfaceInfo info)
|
||||||
UpdateDrawRectangle();
|
UpdateDrawRectangle();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Presenter::CheckForConfigChanges(u32 changed_bits)
|
void Presenter::ConfigChanged(u32 changed_bits)
|
||||||
{
|
{
|
||||||
// Check for post-processing shader changes. Done up here as it doesn't affect anything outside
|
// Check for post-processing shader changes. Done up here as it doesn't affect anything outside
|
||||||
// the post-processor. Note that options are applied every frame, so no need to check those.
|
// the post-processor. Note that options are applied every frame, so no need to check those.
|
||||||
|
|
|
@ -44,7 +44,7 @@ public:
|
||||||
|
|
||||||
bool Initialize();
|
bool Initialize();
|
||||||
|
|
||||||
void CheckForConfigChanges(u32 changed_bits);
|
void ConfigChanged(u32 changed_bits);
|
||||||
|
|
||||||
// Display resolution
|
// Display resolution
|
||||||
int GetBackbufferWidth() const { return m_backbuffer_width; }
|
int GetBackbufferWidth() const { return m_backbuffer_width; }
|
||||||
|
@ -147,6 +147,8 @@ private:
|
||||||
u32 m_last_xfb_width = MAX_XFB_WIDTH;
|
u32 m_last_xfb_width = MAX_XFB_WIDTH;
|
||||||
u32 m_last_xfb_stride = 0;
|
u32 m_last_xfb_stride = 0;
|
||||||
u32 m_last_xfb_height = MAX_XFB_HEIGHT;
|
u32 m_last_xfb_height = MAX_XFB_HEIGHT;
|
||||||
|
|
||||||
|
Common::EventHook m_config_changed;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace VideoCommon
|
} // namespace VideoCommon
|
||||||
|
|
Loading…
Reference in a new issue