0
0
mirror of https://github.com/obsproject/obs-studio.git synced 2024-09-20 13:08:50 +02:00

win-capture: Make open_process_proc static

Seems like the original intention and avoids repeatedly calling
GetProcAddress. Detected by PVS Studio.
This commit is contained in:
Richard Stanway 2022-01-17 23:55:33 +01:00
parent 1af1a432e2
commit ecf8c1239d
No known key found for this signature in database
GPG Key ID: 4F96FCA24BCE7BA1

View File

@ -286,7 +286,7 @@ static inline HANDLE open_process(DWORD desired_access, bool inherit_handle,
DWORD process_id)
{
typedef HANDLE(WINAPI * PFN_OpenProcess)(DWORD, BOOL, DWORD);
PFN_OpenProcess open_process_proc = NULL;
static PFN_OpenProcess open_process_proc = NULL;
if (!open_process_proc)
open_process_proc = (PFN_OpenProcess)get_obfuscated_func(
kernel32(), "NuagUykjcxr", 0x1B694B59451ULL);