summaryrefslogtreecommitdiffstats
path: root/loader/vfl.c
diff options
context:
space:
mode:
authorjkeil <jkeil@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-07-12 15:27:48 +0000
committerjkeil <jkeil@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-07-12 15:27:48 +0000
commita26b39974fb992cb400c6e9aff0a02737c2f4f59 (patch)
treebd6802ff279bb9ed79a9dec7f367861309741686 /loader/vfl.c
parent009d2b0dc7ce5d7089bdb4136d1b575b115981d0 (diff)
downloadmpv-a26b39974fb992cb400c6e9aff0a02737c2f4f59.tar.bz2
mpv-a26b39974fb992cb400c6e9aff0a02737c2f4f59.tar.xz
Add prototypes to wine/loader stuff, so that we can catch __stdcall function
attribute mismatch between caller/caller. wine/loader is less sensitive to optimization now. (now that avifile-0.6 has the same patch installed, we're a bit closer to their CVS tree) Speed up win32 "QueryPerformanceFrequency" emulation on solaris. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1308 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'loader/vfl.c')
-rw-r--r--loader/vfl.c49
1 files changed, 26 insertions, 23 deletions
diff --git a/loader/vfl.c b/loader/vfl.c
index a16986aa33..d15518c35e 100644
--- a/loader/vfl.c
+++ b/loader/vfl.c
@@ -6,6 +6,9 @@
#include <stdio.h>
#include <string.h>
+#include "win32.h"
+#include "loader.h"
+
#include "wine/winbase.h"
#include "wine/windef.h"
#include "wine/winuser.h"
@@ -13,29 +16,31 @@
#include "wine/winestring.h"
#include "wine/driver.h"
#include "wine/avifmt.h"
+#include "driver.h"
+
#define FIXME_(X) printf
#define FIXME printf
-long VFWAPI VideoForWindowsVersion(void);
-
-extern void* my_mreq(int size, int to_zero);
-extern void DrvClose(HDRVR hdrvr);
-extern int my_release(void* memory);
-
-long VFWAPIV ICDecompress(HIC hic,long dwFlags,LPBITMAPINFOHEADER lpbiFormat,void* lpData,LPBITMAPINFOHEADER lpbi,void* lpBits);
+#define OpenDriverA DrvOpen
+#define CloseDriver DrvClose
-WIN_BOOL VFWAPI ICInfo(long fccType, long fccHandler, ICINFO * lpicinfo);
-LRESULT VFWAPI ICGetInfo(HIC hic,ICINFO *picinfo, long cb);
-HIC VFWAPI ICOpen(long fccType, long fccHandler, UINT wMode);
-HIC VFWAPI ICOpenFunction(long fccType, long fccHandler, unsigned int wMode, void* lpfnHandler);
+long VFWAPI VideoForWindowsVersion(void);
-LRESULT VFWAPI ICClose(HIC hic);
-LRESULT VFWAPI ICSendMessage(HIC hic, unsigned int msg, long dw1, long dw2);
-HIC VFWAPI ICLocate(long fccType, long fccHandler, LPBITMAPINFOHEADER lpbiIn, LPBITMAPINFOHEADER lpbiOut, short wFlags);
-#define OpenDriverA DrvOpen
-extern HDRVR VFWAPI DrvOpen(long);
+#if 1
+/*
+ * STORE_ALL/REST_ALL seems like an attempt to workaround problems due to
+ * WINAPI/no-WINAPI bustage.
+ *
+ * There should be no need for the STORE_ALL/REST_ALL hack once all
+ * function definitions agree with their prototypes (WINAPI-wise) and
+ * we make sure, that we do not call these functions without a proper
+ * prototype in scope.
+ */
+#define STORE_ALL /**/
+#define REST_ALL /**/
+#else
#define STORE_ALL \
__asm__ ( \
"push %%ebx\n\t" \
@@ -51,15 +56,9 @@ extern HDRVR VFWAPI DrvOpen(long);
"pop %%edx\n\t" \
"pop %%ecx\n\t" \
"pop %%ebx\n\t"::)
+#endif
-typedef struct {
- unsigned int uDriverSignature;
- void* hDriverModule;
- DRIVERPROC DriverProc;
- long dwDriverID;
-} DRVR;
-
/***********************************************************************
* VideoForWindowsVersion [MSVFW.2][MSVIDEO.2]
* Returns the version in major.minor form.
@@ -351,7 +350,9 @@ ICSendMessage(HIC hic,unsigned int msg,long lParam1,long lParam2) {
WINE_HIC *whic = (WINE_HIC*)hic;
char qw[200];
+#if 0
__asm__ __volatile__ ("fsave (%0)\n\t": :"r"(&qw));
+#endif
STORE_ALL;
/*__asm__
(
@@ -362,7 +363,9 @@ ICSendMessage(HIC hic,unsigned int msg,long lParam1,long lParam2) {
);*/
ret = whic->driverproc(whic->private,1,msg,lParam1,lParam2);
REST_ALL;
+#if 0
__asm__ __volatile__ ("frstor (%0)\n\t": :"r"(&qw));
+#endif
// } else
// ret = SendDriverMessage(whic->hdrv,msg,lParam1,lParam2);