Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#1 fpse version number hack

open
nobody
None
5
2002-01-13
2002-01-13
Anonymous
No

Here is a little hack to the fpse wrapper to allow the
plugin to retrieve the version number from the psemu
function PSEGetVersion instead of doing it manually
(this was forgotten in the release 1.4 ;) )
Probably there's a nicer way to do it (e. g. move the
version number in a header file) but in this way I
only changed fpsewp.c and fpsewp.h without touching
the psemu version.
This was tested in windows (it gives 2 warnings, but
they should be safe)

in fpsewp.h I added

long CALLBACK PSEgetLibVersion(void);

in fpsewp.c

1) I removed

#define VERSION 0x0103 // Version must be in
BCD format

2) I initialized the fields VerHi e VerLo of struct
info to 0

3) I modified GPU_About() in this way

void GPU_About(UINT32 *par)
{
unsigned long vers = PSEgetLibVersion();
info.VerLo = vers & 0xFF;
info.VerHi = (vers & 0xFFFF) >> 8;
#ifndef _WINDOWS
#ifdef __BEOS__
memcpy( par, &info, sizeof(FPSEbeosAbout) );
#endif
memcpy( par, &info, sizeof(FPSElinuxAbout) );
#else
memcpy( par, &info, sizeof(FPSEWin32About) );
#endif
}

Discussion