Don't discard ConfigChanged callback handle
This commit is contained in:
parent
95ce41ac56
commit
b7db2510ef
|
@ -18,7 +18,8 @@ std::unique_ptr<AbstractGfx> g_gfx;
|
||||||
|
|
||||||
AbstractGfx::AbstractGfx()
|
AbstractGfx::AbstractGfx()
|
||||||
{
|
{
|
||||||
ConfigChangedEvent::Register([this](u32 bits) { OnConfigChanged(bits); }, "AbstractGfx");
|
m_config_changed =
|
||||||
|
ConfigChangedEvent::Register([this](u32 bits) { OnConfigChanged(bits); }, "AbstractGfx");
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AbstractGfx::IsHeadless() const
|
bool AbstractGfx::IsHeadless() const
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include "Common/HookableEvent.h"
|
||||||
#include "Common/MathUtil.h"
|
#include "Common/MathUtil.h"
|
||||||
|
|
||||||
#include "VideoCommon/RenderState.h"
|
#include "VideoCommon/RenderState.h"
|
||||||
|
@ -166,6 +167,9 @@ public:
|
||||||
protected:
|
protected:
|
||||||
AbstractFramebuffer* m_current_framebuffer = nullptr;
|
AbstractFramebuffer* m_current_framebuffer = nullptr;
|
||||||
const AbstractPipeline* m_current_pipeline = nullptr;
|
const AbstractPipeline* m_current_pipeline = nullptr;
|
||||||
|
|
||||||
|
private:
|
||||||
|
Common::EventHook m_config_changed;
|
||||||
};
|
};
|
||||||
|
|
||||||
extern std::unique_ptr<AbstractGfx> g_gfx;
|
extern std::unique_ptr<AbstractGfx> g_gfx;
|
||||||
|
|
Loading…
Reference in New Issue