[Mplayer-cvslog] CVS: main/loader com.h,1.5,1.6 driver.c,1.10,1.11

Alex Beregszaszi alex at mplayerhq.hu
Mon Apr 21 23:06:39 CEST 2003


Update of /cvsroot/mplayer/main/loader
In directory mail:/var/tmp.root/cvs-serv21596

Modified Files:
	com.h driver.c 
Log Message:
cygwin support patch by Sascha Sommer and some fixes by me

Index: com.h
===================================================================
RCS file: /cvsroot/mplayer/main/loader/com.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- com.h	13 Sep 2002 19:43:13 -0000	1.5
+++ com.h	21 Apr 2003 21:06:06 -0000	1.6
@@ -1,9 +1,8 @@
 #ifndef AVIFILE_COM_H
 #define AVIFILE_COM_H
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "config.h"
+
 #ifdef HAVE_STDINT_H
 #include <stdint.h>
 #else
@@ -14,7 +13,7 @@
  * Internal functions and structures for COM emulation code.
  */
 
-#ifndef WIN32
+#if !defined(WIN32) || defined(__CYGWIN__) || defined(__MINGW32)
 
 #ifdef __cplusplus
 extern "C" {

Index: driver.c
===================================================================
RCS file: /cvsroot/mplayer/main/loader/driver.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- driver.c	14 Dec 2002 17:56:21 -0000	1.10
+++ driver.c	21 Apr 2003 21:06:06 -0000	1.11
@@ -15,11 +15,17 @@
 #include "wine/winreg.h"
 #include "wine/vfw.h"
 #include "registry.h"
+#ifdef WIN32_LOADER
 #include "ldt_keeper.h"
+#endif
 #include "driver.h"
 #include "ext.h"
 
+#ifndef WIN32_LOADER
+char* def_path=WIN32_PATH;
+#else
 extern char* def_path;
+#endif
 
 #if 1
 
@@ -87,7 +93,9 @@
     __asm__ __volatile__ ("fsave (%0)\n\t": :"r"(&qw));
 #endif
 
+#ifdef WIN32_LOADER
     Setup_FS_Segment();
+#endif
 
     STORE_ALL;
     result=module->DriverProc(module->dwDriverID, hDriver, message, lParam1, lParam2);
@@ -110,7 +118,9 @@
 	DRVR* d = (DRVR*)hDriver;
 	if (d->hDriverModule)
 	{
+#ifdef WIN32_LOADER
 	    Setup_FS_Segment();
+#endif
 	    if (d->DriverProc)
 	    {
 		SendDriverMessage(hDriver, DRV_CLOSE, 0, 0);
@@ -121,7 +131,9 @@
 	}
 	free(d);
     }
+#ifdef WIN32_LOADER
     CodecRelease();
+#endif
 }
 
 //DrvOpen(LPCSTR lpszDriverName, LPCSTR lpszSectionName, LPARAM lParam2)
@@ -133,7 +145,9 @@
     const char* filename = (const char*) ((ICOPEN*) lParam2)->pV1Reserved;
 
 #ifdef MPLAYER
+#ifdef WIN32_LOADER
     Setup_LDT_Keeper();
+#endif
     printf("Loading codec DLL: '%s'\n",filename);
 #endif
 
@@ -142,8 +156,10 @@
 	return ((HDRVR) 0);
     memset((void*)hDriver, 0, sizeof(DRVR));
 
+#ifdef WIN32_LOADER
     CodecAlloc();
     Setup_FS_Segment();
+#endif
 
     hDriver->hDriverModule = LoadLibraryA(filename);
     if (!hDriver->hDriverModule)



More information about the MPlayer-cvslog mailing list