MCPcopy Create free account
hub / github.com/GameTechDev/PresentMon / AddEvent

Method AddEvent

PresentData/PresentMonTraceSession.cpp:170–190  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

168
169 template<typename T>
170 void AddEvent()
171 {
172 if (pListener_) {
173 pListener_->EventAdded(T::Id);
174 }
175
176 uint64_t keyword = (uint64_t)T::Keyword;
177 PatchKeyword<T>(&keyword);
178 if (!isWin11OrGreater_) {
179 PatchPreWin11Keyword<T>(&keyword);
180 }
181 AddKeyword(keyword);
182
183 maxLevel_ = std::max(maxLevel_, T::Level);
184
185 if (filterDesc_.Ptr != 0 && !isDryRun_) {
186 auto filteredEventIds = (EVENT_FILTER_EVENT_ID*) filterDesc_.Ptr;
187 assert(filteredEventIds->Count < MAX_EVENT_FILTER_EVENT_ID_COUNT);
188 filteredEventIds->Events[filteredEventIds->Count++] = T::Id;
189 }
190 }
191
192 ULONG Enable(
193 TRACEHANDLE sessionHandle,

Callers

nothing calls this directly

Calls 1

EventAddedMethod · 0.45

Tested by

no test coverage detected