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

Function SetOutputRecordingState

PresentMon/OutputThread.cpp:42–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40static bool gIsRecording = false;
41
42void SetOutputRecordingState(bool record)
43{
44 auto const& args = GetCommandLineArgs();
45
46 EnterCriticalSection(&gRecordingToggleCS);
47
48 if (gIsRecording != record) {
49 gIsRecording = record;
50
51 // When capturing from an ETL file, just use the current recording state.
52 // It's not clear how best to map realtime to ETL QPC time, and there
53 // aren't any realtime cues in this case.
54 if (args.mEtlFileName == nullptr) {
55 uint64_t qpc = 0;
56 QueryPerformanceCounter((LARGE_INTEGER*) &qpc);
57 gRecordingToggleHistory.emplace_back(qpc);
58 }
59 }
60
61 LeaveCriticalSection(&gRecordingToggleCS);
62}
63
64static bool CopyRecordingToggleHistory(std::vector<uint64_t>* recordingToggleHistory)
65{

Callers 2

StartRecordingFunction · 0.85
StopRecordingFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected