diff --git a/plugins/win-capture/game-capture.c b/plugins/win-capture/game-capture.c index a47f4912e..fb28336f1 100644 --- a/plugins/win-capture/game-capture.c +++ b/plugins/win-capture/game-capture.c @@ -930,7 +930,7 @@ static inline bool inject_hook(struct game_capture *gc) } else { info("using helper (%s hook)", use_anticheat(gc) ? "compatibility" : "direct"); - success = create_inject_process(gc, inject_path, hook_dll); + success = create_inject_process(gc, inject_path, hook_path); } cleanup: diff --git a/plugins/win-capture/inject-helper/inject-helper.c b/plugins/win-capture/inject-helper/inject-helper.c index e35042b48..636350ce6 100644 --- a/plugins/win-capture/inject-helper/inject-helper.c +++ b/plugins/win-capture/inject-helper/inject-helper.c @@ -109,12 +109,7 @@ int main(int argc, char *argv_ansi[]) if (argv && argc == 4) { DWORD size = GetModuleFileNameW(NULL, dll_path, MAX_PATH); if (size) { - wchar_t *name_start = wcsrchr(dll_path, '\\'); - if (name_start) { - *(++name_start) = 0; - wcscpy(name_start, argv[1]); - ret = inject_helper(argv, dll_path); - } + ret = inject_helper(argv, argv[1]); } } LocalFree(argv);