summaryrefslogtreecommitdiff
path: root/Source/Core/Common/DynamicLibrary.cpp
diff options
context:
space:
mode:
authorDentomologist <dentomologist@gmail.com>2026-03-07 12:33:39 -0800
committerDentomologist <dentomologist@gmail.com>2026-03-07 12:50:59 -0800
commit252ec7452c4c908537036215c1888f5c5d596bd7 (patch)
tree3a4dda9454f04b8d10af7669b165c4ec149f9511 /Source/Core/Common/DynamicLibrary.cpp
parent49d5299f1e41930d31cc83dc28c4c583589ff674 (diff)
PerformanceMetrics: Use HookableEvent for state changed callback
Use the normal state changed `HookableEvent` instead of having `Core::NotifyStateChanged` call `g_perf_metrics.OnEmulationStateChanged` directly. The direct call was added in bad78cfed416d89ceb6b0acf6c134d3691b3d624 to avoid a crash. At the time state changed callbacks were stored in a vector, and the crash was caused by `g_perf_metric`'s destructor trying to remove the callback from the already-destroyed vector. Later a97627e736ff352e031123519c799e65cc98b32c switched state changed callbacks to use `HookableEvent`, which is specifically designed to handle the case where a hook outlives its associated event. Since the workaround is no longer necessary replace it with a standard `EventHook`.
Diffstat (limited to 'Source/Core/Common/DynamicLibrary.cpp')
0 files changed, 0 insertions, 0 deletions