From 6eaac8642d90b9be0143af6ffd5f079cd8a35afe Mon Sep 17 00:00:00 2001 From: FunkyFr3sh Date: Sat, 1 Jun 2024 22:59:12 +0200 Subject: [PATCH] fix cutscene playback on windows 7 --- src/hook.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/hook.c b/src/hook.c index c6ef7df..372d891 100644 --- a/src/hook.c +++ b/src/hook.c @@ -9,6 +9,7 @@ #include "dllmain.h" #include "config.h" #include "utils.h" +#include "versionhelpers.h" #ifdef _MSC_VER #include "detours.h" @@ -537,9 +538,10 @@ void hook_create(HOOKLIST* hooks, BOOL initial_hook) continue; BOOL is_local = _strnicmp(game_dir, mod_dir, strlen(game_dir)) == 0; + BOOL wine_hook = IsWine() && _strcmpi(mod_filename, "mciavi32") == 0; if (is_local || - _strcmpi(mod_filename, "mciavi32") == 0 || + wine_hook || _strcmpi(mod_filename, "QuickTime") == 0 || _strcmpi(mod_filename, "MSVFW32") == 0 || _strcmpi(mod_filename, "quartz") == 0 || @@ -603,9 +605,10 @@ void hook_revert(HOOKLIST* hooks) _splitpath(mod_path, NULL, mod_dir, mod_filename, NULL); BOOL is_local = _strnicmp(game_dir, mod_dir, strlen(game_dir)) == 0; + BOOL wine_hook = IsWine() && _strcmpi(mod_filename, "mciavi32") == 0; if (is_local || - _strcmpi(mod_filename, "mciavi32") == 0 || + wine_hook || _strcmpi(mod_filename, "QuickTime") == 0 || _strcmpi(mod_filename, "MSVFW32") == 0 || _strcmpi(mod_filename, "quartz") == 0 ||