mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
VideoCommon/Statistics: Remove global system accessor from s_after_frame_event
Instead, we make the event take a reference to the system and then pass it in when the event is triggered. This does introduce two other accessors, but these are much easier to refactor out over time, and without modification to the existing event interface.
This commit is contained in:
@ -6,6 +6,11 @@
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Common/HookableEvent.h"
|
||||
|
||||
namespace Core
|
||||
{
|
||||
class System;
|
||||
}
|
||||
|
||||
// Called when certain video config setting are changed
|
||||
using ConfigChangedEvent = Common::HookableEvent<"ConfigChanged", u32>;
|
||||
|
||||
@ -16,7 +21,7 @@ using BeforeFrameEvent = Common::HookableEvent<"BeforeFrame">;
|
||||
// Useful for "once per frame" usecases.
|
||||
// Note: In a few rare cases, games do multiple XFB copies per frame and join them while presenting.
|
||||
// If this matters to your usecase, you should use BeforePresent instead.
|
||||
using AfterFrameEvent = Common::HookableEvent<"AfterFrame">;
|
||||
using AfterFrameEvent = Common::HookableEvent<"AfterFrame", Core::System&>;
|
||||
|
||||
struct PresentInfo
|
||||
{
|
||||
|
Reference in New Issue
Block a user