mirror of
https://github.com/izzy2lost/dolphin.git
synced 2026-06-19 01:16:48 -07:00
Common: Make HookableEvent use non-static data.
Co-authored-by: Dentomologist <dentomologist@gmail.com>
This commit is contained in:
co-authored by
Dentomologist
parent
9c28f19e56
commit
f289b06e0d
@@ -29,7 +29,10 @@ WidescreenManager::WidescreenManager()
|
||||
"Invalid suggested aspect ratio mode: only Auto, 4:3 and 16:9 are supported");
|
||||
}
|
||||
|
||||
m_config_changed = ConfigChangedEvent::Register(
|
||||
auto& system = Core::System::GetInstance();
|
||||
auto& video_events = system.GetVideoEvents();
|
||||
|
||||
m_config_changed = video_events.config_changed_event.Register(
|
||||
[this](u32 bits) {
|
||||
if (bits & (CONFIG_CHANGE_BIT_ASPECT_RATIO))
|
||||
{
|
||||
@@ -45,10 +48,9 @@ WidescreenManager::WidescreenManager()
|
||||
"Widescreen");
|
||||
|
||||
// VertexManager doesn't maintain statistics in Wii mode.
|
||||
auto& system = Core::System::GetInstance();
|
||||
if (!system.IsWii())
|
||||
{
|
||||
m_update_widescreen = AfterFrameEvent::Register(
|
||||
m_update_widescreen = video_events.after_frame_event.Register(
|
||||
[this](Core::System&) { UpdateWidescreenHeuristic(); }, "WideScreen Heuristic");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user