A Makefile. Merely compiling it is only half the fun.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4119 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
118587329c
commit
c39db1d7a4
2 changed files with 14 additions and 10 deletions
6
plugins/berkelium/Makefile
Normal file
6
plugins/berkelium/Makefile
Normal file
|
@ -0,0 +1,6 @@
|
|||
all: linux32 linux64
|
||||
linux32:
|
||||
gcc -fvisibility=hidden -shared -fPIC -m32 -lstdc++ -Llib32 -llibberkelium plugapi.cpp ../plugin.c ../qvm_api.c -oberkeliumx86.so -I.
|
||||
|
||||
linux64:
|
||||
gcc -fvisibility=hidden -shared -fPIC -m64 -lstdc++ -Llib64 -llibberkelium plugapi.cpp ../plugin.c ../qvm_api.c -oberkeliumamd.so -I.
|
|
@ -102,7 +102,7 @@ static void *Dec_Create(char *medianame)
|
|||
if (!strncmp(medianame, "berkelium:", 10))
|
||||
medianame = medianame + 10;
|
||||
else if (!strcmp(medianame, "berkelium"))
|
||||
medianame = "about:blank";
|
||||
medianame = (char*)"about:blank";
|
||||
else if (!strncmp(medianame, "http:", 5))
|
||||
medianame = medianame; //and direct http requests.
|
||||
else
|
||||
|
@ -251,22 +251,19 @@ static void Dec_ChangeStream(void *vctx, char *newstream)
|
|||
|
||||
static bool Dec_Init(void)
|
||||
{
|
||||
if (!Berkelium::init(Berkelium::FileString::empty()))
|
||||
{
|
||||
Con_Printf("Couldn't initialize Berkelium.\n");
|
||||
return false;
|
||||
}
|
||||
//linux lags behind and apparently returns void.
|
||||
Berkelium::init(Berkelium::FileString::empty());
|
||||
return true;
|
||||
}
|
||||
|
||||
static int Dec_Tick(int *args)
|
||||
static qintptr_t Dec_Tick(qintptr_t *args)
|
||||
{
|
||||
//need to keep it ticking over, if any work is to be done.
|
||||
Berkelium::update();
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int Dec_Shutdown(int *args)
|
||||
static qintptr_t Dec_Shutdown(qintptr_t *args)
|
||||
{
|
||||
//force-kill all.
|
||||
Berkelium::destroy();
|
||||
|
@ -288,7 +285,7 @@ static media_decoder_funcs_t decoderfuncs =
|
|||
Dec_ChangeStream
|
||||
};
|
||||
|
||||
int Plug_Init(int *args)
|
||||
extern "C" qintptr_t Plug_Init(qintptr_t *args)
|
||||
{
|
||||
if (!Plug_Export("Tick", Dec_Tick))
|
||||
{
|
||||
|
@ -298,7 +295,7 @@ int Plug_Init(int *args)
|
|||
if (!Plug_Export("Shutdown", Dec_Shutdown))
|
||||
{
|
||||
Con_Printf("Berkelium plugin warning: Engine doesn't support Shutdown feature\n");
|
||||
// return false;
|
||||
// return false;
|
||||
}
|
||||
if (!Plug_ExportNative("Media_VideoDecoder", &decoderfuncs))
|
||||
{
|
||||
|
@ -307,3 +304,4 @@ int Plug_Init(int *args)
|
|||
}
|
||||
return Dec_Init();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue