summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorEv1lbl0w <ricasubtil@gmail.com>2020-05-11 15:26:10 +0100
committerEv1lbl0w <ricasubtil@gmail.com>2020-05-13 16:48:14 +0100
commit75ce45440a9a2cd6363b5f04205d201dba6dec5d (patch)
tree0c6d206ac5768d1635a18586e79e0832afa0d846 /platform
parente7c9d818766a119089873e4941e4865fb36883ec (diff)
Allow Godot to kill it's own PID
Diffstat (limited to 'platform')
-rw-r--r--platform/windows/os_windows.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp
index 0a67a591b7..39c86cd961 100644
--- a/platform/windows/os_windows.cpp
+++ b/platform/windows/os_windows.cpp
@@ -212,6 +212,13 @@ void OS_Windows::initialize() {
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();
main_loop = nullptr;
}