Allow Godot to kill it's own PID

This commit is contained in:
Ev1lbl0w 2020-05-11 15:26:10 +01:00
parent e7c9d81876
commit 75ce45440a
No known key found for this signature in database
GPG Key ID: B383693E3746E58A
1 changed files with 7 additions and 0 deletions

View File

@ -212,6 +212,13 @@ void OS_Windows::initialize() {
process_map = memnew((Map<ProcessID, ProcessInfo>)); process_map = memnew((Map<ProcessID, ProcessInfo>));
// Add current Godot PID to the list of known PIDs
ProcessInfo current_pi = {};
PROCESS_INFORMATION current_pi_pi = {};
current_pi.pi = current_pi_pi;
current_pi.pi.hProcess = GetCurrentProcess();
process_map->insert(GetCurrentProcessId(), current_pi);
IP_Unix::make_default(); IP_Unix::make_default();
main_loop = nullptr; main_loop = nullptr;
} }