diff options
Diffstat (limited to 'win32/plugins/dfxvideo/winsrc')
| -rwxr-xr-x[-rw-r--r--] | win32/plugins/dfxvideo/winsrc/cfg.c | 18 | ||||
| -rwxr-xr-x[-rw-r--r--] | win32/plugins/dfxvideo/winsrc/d3d.h | 0 | ||||
| -rwxr-xr-x[-rw-r--r--] | win32/plugins/dfxvideo/winsrc/d3dcaps.h | 0 | ||||
| -rwxr-xr-x[-rw-r--r--] | win32/plugins/dfxvideo/winsrc/d3dtypes.h | 0 | ||||
| -rwxr-xr-x[-rw-r--r--] | win32/plugins/dfxvideo/winsrc/ddraw.h | 0 | ||||
| -rwxr-xr-x[-rw-r--r--] | win32/plugins/dfxvideo/winsrc/draw.c | 352 | ||||
| -rwxr-xr-x[-rw-r--r--] | win32/plugins/dfxvideo/winsrc/dxguid.c | 2 | ||||
| -rwxr-xr-x[-rw-r--r--] | win32/plugins/dfxvideo/winsrc/fps.c | 92 | ||||
| -rwxr-xr-x[-rw-r--r--] | win32/plugins/dfxvideo/winsrc/key.c | 26 | ||||
| -rwxr-xr-x[-rw-r--r--] | win32/plugins/dfxvideo/winsrc/record.c | 16 | ||||
| -rwxr-xr-x[-rw-r--r--] | win32/plugins/dfxvideo/winsrc/record.h | 0 | ||||
| -rwxr-xr-x[-rw-r--r--] | win32/plugins/dfxvideo/winsrc/winmain.c | 24 |
12 files changed, 265 insertions, 265 deletions
diff --git a/win32/plugins/dfxvideo/winsrc/cfg.c b/win32/plugins/dfxvideo/winsrc/cfg.c index e2b14a01..e1e4e142 100644..100755 --- a/win32/plugins/dfxvideo/winsrc/cfg.c +++ b/win32/plugins/dfxvideo/winsrc/cfg.c @@ -21,8 +21,8 @@ #include "externals.h" #include "cfg.h" #include "gpu.h" -#include "record.h"
-
+#include "record.h" + ///////////////////////////////////////////////////////////////////////////// // globals @@ -936,9 +936,9 @@ static BOOL WINAPI DirectDrawEnumCallbackEx( GUID FAR* pGUID, LPSTR strDesc, LPDIRECTDRAW pDD; LPDIRECTDRAW4 g_pDD; LPDIRECT3D3 pD3D; - HRESULT (WINAPI *pDDrawCreateFn)(GUID *,LPDIRECTDRAW *,IUnknown *);
-
- pDDrawCreateFn = (LPVOID)GetProcAddress( hDDrawDLL, "DirectDrawCreate" );
+ HRESULT (WINAPI *pDDrawCreateFn)(GUID *,LPDIRECTDRAW *,IUnknown *); + + pDDrawCreateFn = (LPVOID)GetProcAddress( hDDrawDLL, "DirectDrawCreate" ); if( pDDrawCreateFn == NULL || FAILED( pDDrawCreateFn( pGUID, &pDD, 0L ) ) ) { @@ -1134,16 +1134,16 @@ BOOL bTestModes(void) { LPDIRECTDRAW pDD; LPDIRECTDRAW4 g_pDD; - HRESULT (WINAPI *pDDrawCreateFn)(GUID *,LPDIRECTDRAW *,IUnknown *);
-
+ HRESULT (WINAPI *pDDrawCreateFn)(GUID *,LPDIRECTDRAW *,IUnknown *); + GUID FAR * guid=0; int i;unsigned char * c=(unsigned char *)&guiDev; for(i=0;i<sizeof(GUID);i++,c++) {if(*c) {guid=&guiDev;break;}} bDeviceOK=FALSE; -
- pDDrawCreateFn = (LPVOID)GetProcAddress(hDDrawDLL, "DirectDrawCreate");
+ + pDDrawCreateFn = (LPVOID)GetProcAddress(hDDrawDLL, "DirectDrawCreate"); if( pDDrawCreateFn == NULL || FAILED( pDDrawCreateFn(guid, &pDD, 0L ) ) ) { diff --git a/win32/plugins/dfxvideo/winsrc/d3d.h b/win32/plugins/dfxvideo/winsrc/d3d.h index 31d61cbb..31d61cbb 100644..100755 --- a/win32/plugins/dfxvideo/winsrc/d3d.h +++ b/win32/plugins/dfxvideo/winsrc/d3d.h diff --git a/win32/plugins/dfxvideo/winsrc/d3dcaps.h b/win32/plugins/dfxvideo/winsrc/d3dcaps.h index d631a675..d631a675 100644..100755 --- a/win32/plugins/dfxvideo/winsrc/d3dcaps.h +++ b/win32/plugins/dfxvideo/winsrc/d3dcaps.h diff --git a/win32/plugins/dfxvideo/winsrc/d3dtypes.h b/win32/plugins/dfxvideo/winsrc/d3dtypes.h index 223a0755..223a0755 100644..100755 --- a/win32/plugins/dfxvideo/winsrc/d3dtypes.h +++ b/win32/plugins/dfxvideo/winsrc/d3dtypes.h diff --git a/win32/plugins/dfxvideo/winsrc/ddraw.h b/win32/plugins/dfxvideo/winsrc/ddraw.h index 1288e8bd..1288e8bd 100644..100755 --- a/win32/plugins/dfxvideo/winsrc/ddraw.h +++ b/win32/plugins/dfxvideo/winsrc/ddraw.h diff --git a/win32/plugins/dfxvideo/winsrc/draw.c b/win32/plugins/dfxvideo/winsrc/draw.c index 94095d38..1e82fba8 100644..100755 --- a/win32/plugins/dfxvideo/winsrc/draw.c +++ b/win32/plugins/dfxvideo/winsrc/draw.c @@ -3489,13 +3489,13 @@ void DoBufferSwap(void) // SWAP BUFFERS ViewportRect.right = PreviousPSXDisplay.DisplayMode.x; ViewportRect.bottom = PreviousPSXDisplay.DisplayMode.y; - if(iRumbleTime)
- {
- ScreenRect.left+=((rand()*iRumbleVal)/RAND_MAX)-(iRumbleVal/2);
- ScreenRect.right+=((rand()*iRumbleVal)/RAND_MAX)-(iRumbleVal/2);
- ScreenRect.top+=((rand()*iRumbleVal)/RAND_MAX)-(iRumbleVal/2);
- ScreenRect.bottom+=((rand()*iRumbleVal)/RAND_MAX)-(iRumbleVal/2);
- iRumbleTime--;
+ if(iRumbleTime) + { + ScreenRect.left+=((rand()*iRumbleVal)/RAND_MAX)-(iRumbleVal/2); + ScreenRect.right+=((rand()*iRumbleVal)/RAND_MAX)-(iRumbleVal/2); + ScreenRect.top+=((rand()*iRumbleVal)/RAND_MAX)-(iRumbleVal/2); + ScreenRect.bottom+=((rand()*iRumbleVal)/RAND_MAX)-(iRumbleVal/2); + iRumbleTime--; } } @@ -3528,16 +3528,16 @@ void DoBufferSwap(void) // SWAP BUFFERS ViewportRect.right=1024; ViewportRect.bottom=iGPUHeight; } - else
- {
- if(iRumbleTime)
- {
- ScreenRect.left+=((rand()*iRumbleVal)/RAND_MAX)-(iRumbleVal/2);
- ScreenRect.right+=((rand()*iRumbleVal)/RAND_MAX)-(iRumbleVal/2);
- ScreenRect.top+=((rand()*iRumbleVal)/RAND_MAX)-(iRumbleVal/2);
- ScreenRect.bottom+=((rand()*iRumbleVal)/RAND_MAX)-(iRumbleVal/2);
- iRumbleTime--;
- }
+ else + { + if(iRumbleTime) + { + ScreenRect.left+=((rand()*iRumbleVal)/RAND_MAX)-(iRumbleVal/2); + ScreenRect.right+=((rand()*iRumbleVal)/RAND_MAX)-(iRumbleVal/2); + ScreenRect.top+=((rand()*iRumbleVal)/RAND_MAX)-(iRumbleVal/2); + ScreenRect.bottom+=((rand()*iRumbleVal)/RAND_MAX)-(iRumbleVal/2); + iRumbleTime--; + } } if(iUseScanLines==2) // stupid nvidia scanline mode @@ -3676,7 +3676,7 @@ int DXinitialize() DDSCAPS ddscaps; DDBLTFX ddbltfx; DDPIXELFORMAT dd; - HRESULT (WINAPI *pDDrawCreateFn)(GUID *,LPDIRECTDRAW *,IUnknown *);
+ HRESULT (WINAPI *pDDrawCreateFn)(GUID *,LPDIRECTDRAW *,IUnknown *); // init some DX vars DX.hWnd = (HWND)hWGPU; @@ -3686,9 +3686,9 @@ int DXinitialize() // make guid ! c=(unsigned char *)&guiDev; for(i=0;i<sizeof(GUID);i++,c++) - {if(*c) {guid=&guiDev;break;}}
+ {if(*c) {guid=&guiDev;break;}} - pDDrawCreateFn = (LPVOID)GetProcAddress( hDDrawDLL, "DirectDrawCreate" );
+ pDDrawCreateFn = (LPVOID)GetProcAddress( hDDrawDLL, "DirectDrawCreate" ); // create dd if(pDDrawCreateFn == NULL || pDDrawCreateFn(guid,&DD,0)) @@ -4377,54 +4377,54 @@ static void hq2x_16_def(unsigned short* dst0, unsigned short* dst1, const unsign if (interp_16_diff(c[8], c[4])) mask |= 1 << 7; -#define P0 dst0[0]
-#define P1 dst0[1]
-#define P2 dst1[0]
-#define P3 dst1[1]
-#define MUR interp_16_diff(c[1], c[5])
-#define MDR interp_16_diff(c[5], c[7])
-#define MDL interp_16_diff(c[7], c[3])
-#define MUL interp_16_diff(c[3], c[1])
-#define IC(p0) c[p0]
-#define I11(p0,p1) interp_16_11(c[p0], c[p1])
-#define I211(p0,p1,p2) interp_16_211(c[p0], c[p1], c[p2])
-#define I31(p0,p1) interp_16_31(c[p0], c[p1])
-#define I332(p0,p1,p2) interp_16_332(c[p0], c[p1], c[p2])
-#define I431(p0,p1,p2) interp_16_431(c[p0], c[p1], c[p2])
-#define I521(p0,p1,p2) interp_16_521(c[p0], c[p1], c[p2])
-#define I53(p0,p1) interp_16_53(c[p0], c[p1])
-#define I611(p0,p1,p2) interp_16_611(c[p0], c[p1], c[p2])
-#define I71(p0,p1) interp_16_71(c[p0], c[p1])
-#define I772(p0,p1,p2) interp_16_772(c[p0], c[p1], c[p2])
-#define I97(p0,p1) interp_16_97(c[p0], c[p1])
-#define I1411(p0,p1,p2) interp_16_1411(c[p0], c[p1], c[p2])
-#define I151(p0,p1) interp_16_151(c[p0], c[p1])
-
- switch (mask) {
-#include "hq2x.h"
- }
-
-#undef P0
-#undef P1
-#undef P2
-#undef P3
-#undef MUR
-#undef MDR
-#undef MDL
-#undef MUL
-#undef IC
-#undef I11
-#undef I211
-#undef I31
-#undef I332
-#undef I431
-#undef I521
-#undef I53
-#undef I611
-#undef I71
-#undef I772
-#undef I97
-#undef I1411
+#define P0 dst0[0] +#define P1 dst0[1] +#define P2 dst1[0] +#define P3 dst1[1] +#define MUR interp_16_diff(c[1], c[5]) +#define MDR interp_16_diff(c[5], c[7]) +#define MDL interp_16_diff(c[7], c[3]) +#define MUL interp_16_diff(c[3], c[1]) +#define IC(p0) c[p0] +#define I11(p0,p1) interp_16_11(c[p0], c[p1]) +#define I211(p0,p1,p2) interp_16_211(c[p0], c[p1], c[p2]) +#define I31(p0,p1) interp_16_31(c[p0], c[p1]) +#define I332(p0,p1,p2) interp_16_332(c[p0], c[p1], c[p2]) +#define I431(p0,p1,p2) interp_16_431(c[p0], c[p1], c[p2]) +#define I521(p0,p1,p2) interp_16_521(c[p0], c[p1], c[p2]) +#define I53(p0,p1) interp_16_53(c[p0], c[p1]) +#define I611(p0,p1,p2) interp_16_611(c[p0], c[p1], c[p2]) +#define I71(p0,p1) interp_16_71(c[p0], c[p1]) +#define I772(p0,p1,p2) interp_16_772(c[p0], c[p1], c[p2]) +#define I97(p0,p1) interp_16_97(c[p0], c[p1]) +#define I1411(p0,p1,p2) interp_16_1411(c[p0], c[p1], c[p2]) +#define I151(p0,p1) interp_16_151(c[p0], c[p1]) + + switch (mask) { +#include "hq2x.h" + } + +#undef P0 +#undef P1 +#undef P2 +#undef P3 +#undef MUR +#undef MDR +#undef MDL +#undef MUL +#undef IC +#undef I11 +#undef I211 +#undef I31 +#undef I332 +#undef I431 +#undef I521 +#undef I53 +#undef I611 +#undef I71 +#undef I772 +#undef I97 +#undef I1411 #undef I151 src0 += 1; @@ -4519,55 +4519,55 @@ static void hq2x_32_def(unsigned long * dst0, unsigned long * dst1, const unsign if (interp_32_diff(c[8], c[4])) mask |= 1 << 7; -#define P0 dst0[0]
-#define P1 dst0[1]
-#define P2 dst1[0]
-#define P3 dst1[1]
-#define MUR interp_32_diff(c[1], c[5])
-#define MDR interp_32_diff(c[5], c[7])
-#define MDL interp_32_diff(c[7], c[3])
-#define MUL interp_32_diff(c[3], c[1])
-#define IC(p0) c[p0]
-#define I11(p0,p1) interp_32_11(c[p0], c[p1])
-#define I211(p0,p1,p2) interp_32_211(c[p0], c[p1], c[p2])
-#define I31(p0,p1) interp_32_31(c[p0], c[p1])
-#define I332(p0,p1,p2) interp_32_332(c[p0], c[p1], c[p2])
-#define I431(p0,p1,p2) interp_32_431(c[p0], c[p1], c[p2])
-#define I521(p0,p1,p2) interp_32_521(c[p0], c[p1], c[p2])
-#define I53(p0,p1) interp_32_53(c[p0], c[p1])
-#define I611(p0,p1,p2) interp_32_611(c[p0], c[p1], c[p2])
-#define I71(p0,p1) interp_32_71(c[p0], c[p1])
-#define I772(p0,p1,p2) interp_32_772(c[p0], c[p1], c[p2])
-#define I97(p0,p1) interp_32_97(c[p0], c[p1])
-#define I1411(p0,p1,p2) interp_32_1411(c[p0], c[p1], c[p2])
-#define I151(p0,p1) interp_32_151(c[p0], c[p1])
-
- switch (mask) {
-#include "hq2x.h"
- }
-
-#undef P0
-#undef P1
-#undef P2
-#undef P3
-#undef MUR
-#undef MDR
-#undef MDL
-#undef MUL
-#undef IC
-#undef I11
-#undef I211
-#undef I31
-#undef I332
-#undef I431
-#undef I521
-#undef I53
-#undef I611
-#undef I71
-#undef I772
-#undef I97
-#undef I1411
-#undef I151
+#define P0 dst0[0] +#define P1 dst0[1] +#define P2 dst1[0] +#define P3 dst1[1] +#define MUR interp_32_diff(c[1], c[5]) +#define MDR interp_32_diff(c[5], c[7]) +#define MDL interp_32_diff(c[7], c[3]) +#define MUL interp_32_diff(c[3], c[1]) +#define IC(p0) c[p0] +#define I11(p0,p1) interp_32_11(c[p0], c[p1]) +#define I211(p0,p1,p2) interp_32_211(c[p0], c[p1], c[p2]) +#define I31(p0,p1) interp_32_31(c[p0], c[p1]) +#define I332(p0,p1,p2) interp_32_332(c[p0], c[p1], c[p2]) +#define I431(p0,p1,p2) interp_32_431(c[p0], c[p1], c[p2]) +#define I521(p0,p1,p2) interp_32_521(c[p0], c[p1], c[p2]) +#define I53(p0,p1) interp_32_53(c[p0], c[p1]) +#define I611(p0,p1,p2) interp_32_611(c[p0], c[p1], c[p2]) +#define I71(p0,p1) interp_32_71(c[p0], c[p1]) +#define I772(p0,p1,p2) interp_32_772(c[p0], c[p1], c[p2]) +#define I97(p0,p1) interp_32_97(c[p0], c[p1]) +#define I1411(p0,p1,p2) interp_32_1411(c[p0], c[p1], c[p2]) +#define I151(p0,p1) interp_32_151(c[p0], c[p1]) + + switch (mask) { +#include "hq2x.h" + } + +#undef P0 +#undef P1 +#undef P2 +#undef P3 +#undef MUR +#undef MDR +#undef MDL +#undef MUL +#undef IC +#undef I11 +#undef I211 +#undef I31 +#undef I332 +#undef I431 +#undef I521 +#undef I53 +#undef I611 +#undef I71 +#undef I772 +#undef I97 +#undef I1411 +#undef I151 src0 += 1; src1 += 1; @@ -4823,65 +4823,65 @@ static void hq3x_16_def(unsigned short* dst0, unsigned short* dst1, unsigned sho if (interp_16_diff(c[8], c[4])) mask |= 1 << 7; -#define P0 dst0[0]
-#define P1 dst0[1]
-#define P2 dst0[2]
-#define P3 dst1[0]
-#define P4 dst1[1]
-#define P5 dst1[2]
-#define P6 dst2[0]
-#define P7 dst2[1]
-#define P8 dst2[2]
-#define MUR interp_16_diff(c[1], c[5])
-#define MDR interp_16_diff(c[5], c[7])
-#define MDL interp_16_diff(c[7], c[3])
-#define MUL interp_16_diff(c[3], c[1])
-#define IC(p0) c[p0]
-#define I11(p0,p1) interp_16_11(c[p0], c[p1])
-#define I211(p0,p1,p2) interp_16_211(c[p0], c[p1], c[p2])
-#define I31(p0,p1) interp_16_31(c[p0], c[p1])
-#define I332(p0,p1,p2) interp_16_332(c[p0], c[p1], c[p2])
-#define I431(p0,p1,p2) interp_16_431(c[p0], c[p1], c[p2])
-#define I521(p0,p1,p2) interp_16_521(c[p0], c[p1], c[p2])
-#define I53(p0,p1) interp_16_53(c[p0], c[p1])
-#define I611(p0,p1,p2) interp_16_611(c[p0], c[p1], c[p2])
-#define I71(p0,p1) interp_16_71(c[p0], c[p1])
-#define I772(p0,p1,p2) interp_16_772(c[p0], c[p1], c[p2])
-#define I97(p0,p1) interp_16_97(c[p0], c[p1])
-#define I1411(p0,p1,p2) interp_16_1411(c[p0], c[p1], c[p2])
-#define I151(p0,p1) interp_16_151(c[p0], c[p1])
-
- switch (mask) {
-#include "hq3x.h"
- }
-
-#undef P0
-#undef P1
-#undef P2
-#undef P3
-#undef P4
-#undef P5
-#undef P6
-#undef P7
-#undef P8
-#undef MUR
-#undef MDR
-#undef MDL
-#undef MUL
-#undef IC
-#undef I11
-#undef I211
-#undef I31
-#undef I332
-#undef I431
-#undef I521
-#undef I53
-#undef I611
-#undef I71
-#undef I772
-#undef I97
-#undef I1411
-#undef I151
+#define P0 dst0[0] +#define P1 dst0[1] +#define P2 dst0[2] +#define P3 dst1[0] +#define P4 dst1[1] +#define P5 dst1[2] +#define P6 dst2[0] +#define P7 dst2[1] +#define P8 dst2[2] +#define MUR interp_16_diff(c[1], c[5]) +#define MDR interp_16_diff(c[5], c[7]) +#define MDL interp_16_diff(c[7], c[3]) +#define MUL interp_16_diff(c[3], c[1]) +#define IC(p0) c[p0] +#define I11(p0,p1) interp_16_11(c[p0], c[p1]) +#define I211(p0,p1,p2) interp_16_211(c[p0], c[p1], c[p2]) +#define I31(p0,p1) interp_16_31(c[p0], c[p1]) +#define I332(p0,p1,p2) interp_16_332(c[p0], c[p1], c[p2]) +#define I431(p0,p1,p2) interp_16_431(c[p0], c[p1], c[p2]) +#define I521(p0,p1,p2) interp_16_521(c[p0], c[p1], c[p2]) +#define I53(p0,p1) interp_16_53(c[p0], c[p1]) +#define I611(p0,p1,p2) interp_16_611(c[p0], c[p1], c[p2]) +#define I71(p0,p1) interp_16_71(c[p0], c[p1]) +#define I772(p0,p1,p2) interp_16_772(c[p0], c[p1], c[p2]) +#define I97(p0,p1) interp_16_97(c[p0], c[p1]) +#define I1411(p0,p1,p2) interp_16_1411(c[p0], c[p1], c[p2]) +#define I151(p0,p1) interp_16_151(c[p0], c[p1]) + + switch (mask) { +#include "hq3x.h" + } + +#undef P0 +#undef P1 +#undef P2 +#undef P3 +#undef P4 +#undef P5 +#undef P6 +#undef P7 +#undef P8 +#undef MUR +#undef MDR +#undef MDL +#undef MUL +#undef IC +#undef I11 +#undef I211 +#undef I31 +#undef I332 +#undef I431 +#undef I521 +#undef I53 +#undef I611 +#undef I71 +#undef I772 +#undef I97 +#undef I1411 +#undef I151 src0 += 1; src1 += 1; diff --git a/win32/plugins/dfxvideo/winsrc/dxguid.c b/win32/plugins/dfxvideo/winsrc/dxguid.c index 837f275e..c61fcad4 100644..100755 --- a/win32/plugins/dfxvideo/winsrc/dxguid.c +++ b/win32/plugins/dfxvideo/winsrc/dxguid.c @@ -22,7 +22,7 @@ Nothing. */ -#define INITGUID 1
+#define INITGUID 1 #include <basetyps.h> ///////////////////////////////////////////////////////////////////// diff --git a/win32/plugins/dfxvideo/winsrc/fps.c b/win32/plugins/dfxvideo/winsrc/fps.c index 728a8dd0..432880be 100644..100755 --- a/win32/plugins/dfxvideo/winsrc/fps.c +++ b/win32/plugins/dfxvideo/winsrc/fps.c @@ -15,11 +15,11 @@ * additional informations. * * * ***************************************************************************/ -
+ #define _IN_FPS #include "externals.h" -#include "fps.h"
+#include "fps.h" #include "gpu.h" //////////////////////////////////////////////////////////////////////// @@ -42,33 +42,33 @@ int UseFrameSkip=0; BOOL bInitCap = TRUE; float fps_skip = 0; float fps_cur = 0; -
-////////////////////////////////////////////////////////////////////////
-
-#define MAXLACE 16
-
-void CheckFrameRate(void)
-{
- if(UseFrameSkip) // skipping mode?
- {
- if(!(dwActFixes&0x80)) // not old skipping mode?
- {
- dwLaceCnt++; // -> store cnt of vsync between frames
- if(dwLaceCnt>=MAXLACE && UseFrameLimit) // -> if there are many laces without screen toggling,
- { // do std frame limitation
- if(dwLaceCnt==MAXLACE) bInitCap=TRUE;
- FrameCap();
- }
- }
- else if(UseFrameLimit) FrameCap();
- calcfps(); // -> calc fps display in skipping mode
- }
- else // non-skipping mode:
- {
- if(UseFrameLimit) FrameCap(); // -> do it
- if(ulKeybits&KEY_SHOWFPS) calcfps(); // -> and calc fps display
- }
-}
+ +//////////////////////////////////////////////////////////////////////// + +#define MAXLACE 16 + +void CheckFrameRate(void) +{ + if(UseFrameSkip) // skipping mode? + { + if(!(dwActFixes&0x80)) // not old skipping mode? + { + dwLaceCnt++; // -> store cnt of vsync between frames + if(dwLaceCnt>=MAXLACE && UseFrameLimit) // -> if there are many laces without screen toggling, + { // do std frame limitation + if(dwLaceCnt==MAXLACE) bInitCap=TRUE; + FrameCap(); + } + } + else if(UseFrameLimit) FrameCap(); + calcfps(); // -> calc fps display in skipping mode + } + else // non-skipping mode: + { + if(UseFrameLimit) FrameCap(); // -> do it + if(ulKeybits&KEY_SHOWFPS) calcfps(); // -> and calc fps display + } +} //////////////////////////////////////////////////////////////////////// // WIN VERSION @@ -232,10 +232,10 @@ void FrameSkip(void) dwWaitTime=dwLastLace*dwFrameRateTicks; // -> and now we calc the time the real psx would have needed if(_ticks_since_last_update<dwWaitTime) // -> we were too fast? - {
- if((dwWaitTime-_ticks_since_last_update)> // -> some more security, to prevent
- (60*dwFrameRateTicks)) // wrong waiting times
- _ticks_since_last_update=dwWaitTime;
+ { + if((dwWaitTime-_ticks_since_last_update)> // -> some more security, to prevent + (60*dwFrameRateTicks)) // wrong waiting times + _ticks_since_last_update=dwWaitTime; while(_ticks_since_last_update<dwWaitTime) // -> loop until we have reached the real psx time { // (that's the additional limitation, yup) @@ -294,24 +294,24 @@ void FrameSkip(void) dwWaitTime=dwLaceCnt*dwFrameRateTicks; // calc the 'real psx lace time' if(_ticks_since_last_update>dwWaitTime) // hey, we needed way too long for that frame... - {
- if(UseFrameLimit) // if limitation, we skip just next frame,
- { // and decide after, if we need to do more
- iNumSkips=0;
- }
- else
+ { + if(UseFrameLimit) // if limitation, we skip just next frame, + { // and decide after, if we need to do more + iNumSkips=0; + } + else { - iNumSkips=_ticks_since_last_update/dwWaitTime; // -> calc number of frames to skip to catch up
- iNumSkips--; // -> since we already skip next frame, one down
- if(iNumSkips>MAXSKIP) iNumSkips=MAXSKIP; // -> well, somewhere we have to draw a line
+ iNumSkips=_ticks_since_last_update/dwWaitTime; // -> calc number of frames to skip to catch up + iNumSkips--; // -> since we already skip next frame, one down + if(iNumSkips>MAXSKIP) iNumSkips=MAXSKIP; // -> well, somewhere we have to draw a line } bSkipNextFrame = TRUE; // -> signal for skipping the next frame } else // we were faster than real psx? fine :) if(UseFrameLimit) // frame limit used? so we wait til the 'real psx time' has been reached - {
- if(dwLaceCnt>MAXLACE) // -> security check
- _ticks_since_last_update=dwWaitTime;
+ { + if(dwLaceCnt>MAXLACE) // -> security check + _ticks_since_last_update=dwWaitTime; while(_ticks_since_last_update<dwWaitTime) // just do a waiting loop... { @@ -561,7 +561,7 @@ void InitFPS(void) { bInitCap = TRUE; - if(fFrameRateHz==0) fFrameRateHz=fFrameRate; // set user framerate
+ if(fFrameRateHz==0) fFrameRateHz=fFrameRate; // set user framerate if(IsPerformanceCounter) dwFrameRateTicks=(DWORD)(CPUFrequency.LowPart / fFrameRateHz); diff --git a/win32/plugins/dfxvideo/winsrc/key.c b/win32/plugins/dfxvideo/winsrc/key.c index ad624243..db834e8c 100644..100755 --- a/win32/plugins/dfxvideo/winsrc/key.c +++ b/win32/plugins/dfxvideo/winsrc/key.c @@ -33,7 +33,7 @@ WNDPROC wpOrgWndProc=0; unsigned long ulKeybits=0; char szGPUKeys[11]; -
+ //////////////////////////////////////////////////////////////////////// // keyboard handler //////////////////////////////////////////////////////////////////////// @@ -63,10 +63,10 @@ LRESULT CALLBACK KeyWndProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam) if(wParam==VK_RETURN) bChangeWinMode=TRUE; break; //--------------------------------------------------// - case WM_KEYUP: // key up
-
- if(iDebugMode && wParam==(WPARAM)szGPUKeys[9])
- iFVDisplay=!iFVDisplay;
+ case WM_KEYUP: // key up + + if(iDebugMode && wParam==(WPARAM)szGPUKeys[9]) + iFVDisplay=!iFVDisplay; if(wParam==(WPARAM)szGPUKeys[0]) { @@ -101,14 +101,14 @@ LRESULT CALLBACK KeyWndProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam) if(wParam==(WPARAM)szGPUKeys[4]) {BuildDispMenu(-1); break;} if(wParam==(WPARAM)szGPUKeys[5]) {BuildDispMenu( 1); break;} if(wParam==(WPARAM)szGPUKeys[7]) {bVsync_Key = bVsync_Key==TRUE ? FALSE : TRUE; BuildDispMenu(0);break;} - if(wParam==(WPARAM)szGPUKeys[8])
- {
- iFastFwd = 1 - iFastFwd;
- bSkipNextFrame = FALSE;
- UseFrameSkip=iFastFwd;
- BuildDispMenu(0);
- break;
- }
+ if(wParam==(WPARAM)szGPUKeys[8]) + { + iFastFwd = 1 - iFastFwd; + bSkipNextFrame = FALSE; + UseFrameSkip=iFastFwd; + BuildDispMenu(0); + break; + } break; //--------------------------------------------------// } diff --git a/win32/plugins/dfxvideo/winsrc/record.c b/win32/plugins/dfxvideo/winsrc/record.c index c6d3b86e..52184e18 100644..100755 --- a/win32/plugins/dfxvideo/winsrc/record.c +++ b/win32/plugins/dfxvideo/winsrc/record.c @@ -16,9 +16,9 @@ * * ***************************************************************************/ -#include "externals.h"
-#include "record.h"
-#include "gpu.h"
+#include "externals.h" +#include "record.h" +#include "gpu.h" #include <direct.h> extern BOOL RECORD_RECORDING = FALSE; @@ -123,11 +123,11 @@ opts.cbParms = pCompression->cbState; opts.dwInterleaveEvery = 0; if(AVIMakeCompressedStream(&psCompressed,ps,&opts,NULL)!=AVIERR_OK) goto error; -
-//if(AVIStreamSetFormat(psCompressed,0,&RECORD_BI,RECORD_BI.biSizeImage)!=AVIERR_OK) goto error;
-// fixed:
-if(AVIStreamSetFormat(psCompressed,0,&RECORD_BI,sizeof(RECORD_BI))!=AVIERR_OK) goto error;
-
+ +//if(AVIStreamSetFormat(psCompressed,0,&RECORD_BI,RECORD_BI.biSizeImage)!=AVIERR_OK) goto error; +// fixed: +if(AVIStreamSetFormat(psCompressed,0,&RECORD_BI,sizeof(RECORD_BI))!=AVIERR_OK) goto error; + frame = 0; skip = RECORD_FRAME_RATE_SCALE; return TRUE; diff --git a/win32/plugins/dfxvideo/winsrc/record.h b/win32/plugins/dfxvideo/winsrc/record.h index 498354f3..498354f3 100644..100755 --- a/win32/plugins/dfxvideo/winsrc/record.h +++ b/win32/plugins/dfxvideo/winsrc/record.h diff --git a/win32/plugins/dfxvideo/winsrc/winmain.c b/win32/plugins/dfxvideo/winsrc/winmain.c index baf19648..88a387ef 100644..100755 --- a/win32/plugins/dfxvideo/winsrc/winmain.c +++ b/win32/plugins/dfxvideo/winsrc/winmain.c @@ -18,24 +18,24 @@ #include "externals.h" -HINSTANCE hInst = NULL;
+HINSTANCE hInst = NULL; HMODULE hDDrawDLL = NULL; BOOL APIENTRY DllMain(HANDLE hModule, // DLL INIT DWORD dwReason, LPVOID lpReserved) -{
- switch (dwReason) {
+{ + switch (dwReason) { case DLL_PROCESS_ATTACH: - hInst = (HINSTANCE)hModule;
- hDDrawDLL = LoadLibrary(TEXT("DDRAW.DLL"));
- break;
-
- case DLL_PROCESS_DETACH:
- if (hDDrawDLL) FreeLibrary(hDDrawDLL);
- break;
- }
-
+ hInst = (HINSTANCE)hModule; + hDDrawDLL = LoadLibrary(TEXT("DDRAW.DLL")); + break; + + case DLL_PROCESS_DETACH: + if (hDDrawDLL) FreeLibrary(hDDrawDLL); + break; + } + return TRUE; // very quick :) } |
