changeset 13621:8c6b747eeacf

runtime patching vp31vfw.dll, so non-patched dlls can be used aswell. note: this does not breaks if the dll is already patched
author alex
date Tue, 12 Oct 2004 16:30:40 +0000
parents db051195ad68
children 3c7d56b95a5a
files loader/module.c
diffstat 1 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/loader/module.c	Tue Oct 12 16:13:38 2004 +0000
+++ b/loader/module.c	Tue Oct 12 16:30:40 2004 +0000
@@ -422,6 +422,17 @@
 	if (!wm)
 	    printf("Win32 LoadLibrary failed to load: %s\n", checked);
 
+	if (strstr(libname,"vp31vfw.dll") && wm)
+	{
+	    int i;
+
+	  // sse hack moved from patch dll into runtime patching
+          if (PE_FindExportedFunction(wm, "DriverProc", TRUE)==(void*)0x10001000) {
+	    fprintf(stderr, "VP3 DLL found\n");
+	    for (i=0;i<18;i++) ((char*)0x10004bd6)[i]=0x90;
+	  }
+	}
+
         // remove a few divs in the VP codecs that make trouble
         if (strstr(libname,"vp5vfw.dll") && wm)
         {