// Efficient waiting DWORD waitResult = WaitForSingleObject(hProcess, timeoutMs); if (waitResult == WAIT_OBJECT_0) // Process terminated onGameExit();
The Ghost in the Machine: Understanding GameProcessWatcher.cpp gameprocesswatcher.cpp
void GameProcessWatcher::WatchLoop() while (m_Running) bool found = false; bool isWatching() const return m_isWatching
// Getters DWORD getProcessId() const return m_processId; bool isWatching() const return m_isWatching; When a game closes
When a game closes, this component captures the "exit code." If a game crashes, you may see an error in your launcher logs like ERROR GameProcessWatcher.cpp (224) or Child process abnormal exit , which indicates the watcher detected an unexpected shutdown.