From c77a6ce19eec84f48d5fe056982ca291e4d3b2ae Mon Sep 17 00:00:00 2001 From: FunkyFr3sh Date: Fri, 6 Dec 2024 22:09:53 +0100 Subject: [PATCH] use HKLM for wine --- src/dllmain.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/dllmain.c b/src/dllmain.c index c5ef785..b6c5f2b 100644 --- a/src/dllmain.c +++ b/src/dllmain.c @@ -73,10 +73,12 @@ BOOL WINAPI DllMain(HANDLE hDll, DWORD dwReason, LPVOID lpReserved) /* add registry key for x264vfw */ + BOOL is_wine = real_GetProcAddress(GetModuleHandleA("ntdll.dll"), "wine_get_version") != 0; + HKEY hkey; LONG status = RegCreateKeyExA( - HKEY_CURRENT_USER, + is_wine ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER, "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Drivers32", 0, NULL,