Common: Remove the string parameters from the HookableEvent interface.

This commit is contained in:
Jordan Woyak
2025-11-06 22:34:40 -06:00
parent 5650be6842
commit da6c65bf3b
27 changed files with 83 additions and 125 deletions
+13 -15
View File
@@ -32,26 +32,24 @@ WidescreenManager::WidescreenManager()
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))
{
// If the widescreen flag isn't being overridden by any settings,
// reset it to default if heuristic aren't running or to the last
// heuristic value if they were running.
if (std::optional<bool> is_game_widescreen = GetWidescreenOverride())
m_is_game_widescreen = *is_game_widescreen;
else
m_is_game_widescreen = (m_heuristic_state == HeuristicState::Active_Found_Anamorphic);
}
},
"Widescreen");
m_config_changed = video_events.config_changed_event.Register([this](u32 bits) {
if (bits & (CONFIG_CHANGE_BIT_ASPECT_RATIO))
{
// If the widescreen flag isn't being overridden by any settings,
// reset it to default if heuristic aren't running or to the last
// heuristic value if they were running.
if (std::optional<bool> is_game_widescreen = GetWidescreenOverride())
m_is_game_widescreen = *is_game_widescreen;
else
m_is_game_widescreen = (m_heuristic_state == HeuristicState::Active_Found_Anamorphic);
}
});
// VertexManager doesn't maintain statistics in Wii mode.
if (!system.IsWii())
{
m_update_widescreen = video_events.after_frame_event.Register(
[this](Core::System&) { UpdateWidescreenHeuristic(); }, "WideScreen Heuristic");
[this](Core::System&) { UpdateWidescreenHeuristic(); });
}
}