MCPcopy Create free account
hub / github.com/Norbyte/bg3se / CleanupSanityCheck

Function CleanupSanityCheck

BG3Extender/Extender/Client/ScriptExtenderClient.cpp:131–139  ·  view source on GitHub ↗

Undo "ModCrashSanityCheck" mechanism that disables mods on an unclean exit

Source from the content-addressed store, hash-verified

129
130// Undo "ModCrashSanityCheck" mechanism that disables mods on an unclean exit
131void CleanupSanityCheck()
132{
133 auto path = GetStaticSymbols().ToPath("ModCrashSanityCheck", PathRootType::UserProfile);
134 auto pathw = FromUTF8(path);
135 if (PathIsDirectoryW(pathw.c_str())) {
136 RemoveDirectoryW(pathw.c_str());
137 INFO("Removed ModCrashSanityCheck");
138 }
139}
140
141void ScriptExtender::OnGameStateChanged(GameState fromState, GameState toState)
142{

Callers 1

OnGameStateChangedMethod · 0.85

Calls 2

ToPathMethod · 0.80
FromUTF8Function · 0.50

Tested by

no test coverage detected