MCPcopy Create free account
hub / github.com/crashfort/SourceDemoRender / LoadFuncData

Class LoadFuncData

Projects/Library/Interface/LibraryInterface.cpp:57–98  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55 }
56
57 struct LoadFuncData : SDR::LauncherCLI::ShadowState
58 {
59 void Create(SDR::LauncherCLI::StageType stage)
60 {
61 auto successname = SDR::LauncherCLI::CreateEventSuccessName(stage);
62 auto failname = SDR::LauncherCLI::CreateEventFailureName(stage);
63
64 EventSuccess.Attach(OpenEventA(EVENT_MODIFY_STATE, false, successname.c_str()));
65 EventFailure.Attach(OpenEventA(EVENT_MODIFY_STATE, false, failname.c_str()));
66
67 if (!EventSuccess.IsValid())
68 {
69 SDR::Error::Microsoft::ThrowLastError("Could not open success event");
70 }
71
72 if (!EventFailure.IsValid())
73 {
74 SDR::Error::Microsoft::ThrowLastError("Could not open failure event");
75 }
76 }
77
78 ~LoadFuncData()
79 {
80 if (Failure)
81 {
82 if (EventFailure.IsValid())
83 {
84 SetEvent(EventFailure.Get());
85 }
86 }
87
88 else
89 {
90 if (EventSuccess.IsValid())
91 {
92 SetEvent(EventSuccess.Get());
93 }
94 }
95 }
96
97 bool Failure = true;
98 };
99
100 void WriteToLauncherCLI(const char* text)
101 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected