Merge pull request #11625 from phire/eventhook_nodiscard
Fix KillRenderer config changed regression
This commit is contained in:
commit
4acdbc0e84
|
@ -91,7 +91,7 @@ private:
|
|||
|
||||
public:
|
||||
// Returns a handle that will unregister the listener when destroyed.
|
||||
static EventHook Register(CallbackType callback, std::string name)
|
||||
[[nodiscard]] static EventHook Register(CallbackType callback, std::string name)
|
||||
{
|
||||
auto& storage = GetStorage();
|
||||
std::lock_guard lock(storage.m_mutex);
|
||||
|
|
|
@ -18,6 +18,7 @@ std::unique_ptr<AbstractGfx> g_gfx;
|
|||
|
||||
AbstractGfx::AbstractGfx()
|
||||
{
|
||||
m_config_changed =
|
||||
ConfigChangedEvent::Register([this](u32 bits) { OnConfigChanged(bits); }, "AbstractGfx");
|
||||
}
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "Common/HookableEvent.h"
|
||||
#include "Common/MathUtil.h"
|
||||
|
||||
#include "VideoCommon/RenderState.h"
|
||||
|
@ -166,6 +167,9 @@ public:
|
|||
protected:
|
||||
AbstractFramebuffer* m_current_framebuffer = nullptr;
|
||||
const AbstractPipeline* m_current_pipeline = nullptr;
|
||||
|
||||
private:
|
||||
Common::EventHook m_config_changed;
|
||||
};
|
||||
|
||||
extern std::unique_ptr<AbstractGfx> g_gfx;
|
||||
|
|
Loading…
Reference in New Issue