From c21e85ed90b13009796bac3c84f7df3987cf628b Mon Sep 17 00:00:00 2001 From: moe li Date: Wed, 29 Apr 2026 23:16:43 +0800 Subject: [PATCH] remove unnecessary win32 util function --- src/rcore.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/src/rcore.c b/src/rcore.c index 0f2d8635b..3194d3c2b 100644 --- a/src/rcore.c +++ b/src/rcore.c @@ -4244,16 +4244,6 @@ int GetTouchPointCount(void) // Module Functions Definition: Process Execution //---------------------------------------------------------------------------------- -#if defined(_WIN32) - -static void* GetProcessHandleByID(int pid) -{ - // PROCESS_QUERY_INFORMATION | PROCESS_TERMINATE | PROCESS_SUSPEND_RESUME - return OpenProcess(0x0400 | 0x0001 | 0x0800, 0, (unsigned long)pid); -} - -#endif - // Initialize a new process, returns a Process struct RLAPI Process InitProcess(const char *command, char *const args[]) { @@ -4460,7 +4450,8 @@ RLAPI void CloseProcess(Process *process) return; } #if defined(_WIN32) - void* hProcess = GetProcessHandleByID(process->pid); + // PROCESS_QUERY_INFORMATION | PROCESS_TERMINATE | PROCESS_SUSPEND_RESUME + void* hProcess = OpenProcess(0x0400 | 0x0001 | 0x0800, 0, (unsigned long)process->pid); if (hProcess == NULL) { TRACELOG(LOG_WARNING, "PROCESS: Failed to open process handle");