diff options
author | alex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2003-04-21 21:06:08 +0000 |
---|---|---|
committer | alex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2003-04-21 21:06:08 +0000 |
commit | 597c4bf9259a707196273bd6cfe06bb408fb6843 (patch) | |
tree | d0c3bc73a8c113bbdc6d14c2d8f71519f4b95739 /loader/driver.c | |
parent | 6d21e908a0cc9fccdcfa0063af05cd1627dcc9bb (diff) | |
download | mpv-597c4bf9259a707196273bd6cfe06bb408fb6843.tar.bz2 mpv-597c4bf9259a707196273bd6cfe06bb408fb6843.tar.xz |
cygwin support patch by Sascha Sommer and some fixes by me
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9968 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'loader/driver.c')
-rw-r--r-- | loader/driver.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/loader/driver.c b/loader/driver.c index 7f41288b2f..4908f72513 100644 --- a/loader/driver.c +++ b/loader/driver.c @@ -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 @@ LRESULT WINAPI SendDriverMessage(HDRVR hDriver, UINT message, __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 @@ void DrvClose(HDRVR hDriver) 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 @@ void DrvClose(HDRVR hDriver) } free(d); } +#ifdef WIN32_LOADER CodecRelease(); +#endif } //DrvOpen(LPCSTR lpszDriverName, LPCSTR lpszSectionName, LPARAM lParam2) @@ -133,7 +145,9 @@ HDRVR DrvOpen(LPARAM lParam2) 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 @@ HDRVR DrvOpen(LPARAM lParam2) return ((HDRVR) 0); memset((void*)hDriver, 0, sizeof(DRVR)); +#ifdef WIN32_LOADER CodecAlloc(); Setup_FS_Segment(); +#endif hDriver->hDriverModule = LoadLibraryA(filename); if (!hDriver->hDriverModule) |