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

Method SetActive

IntelPresentMon/Core/source/kernel/InjectorComplex.cpp:15–26  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13 namespace as = boost::asio;
14
15 void InjectorComplex::SetActive(bool active)
16 {
17 std::lock_guard lk{ mtx_ };
18 if (!IsActive(false) && active) {
19 pInjector32_ = std::make_unique<InjectorModule_>(true);
20 pInjector64_ = std::make_unique<InjectorModule_>(false);
21 }
22 else if (!active) {
23 pInjector32_.reset();
24 pInjector64_.reset();
25 }
26 }
27 bool InjectorComplex::IsActive(bool lock) const
28 {
29 std::unique_lock lk{ mtx_, std::defer_lock };

Callers 1

UpdateInjectionMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected