minor tweaks.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4455 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
dcc3d4c5d9
commit
cf893a1921
5 changed files with 35 additions and 12 deletions
|
@ -215,6 +215,8 @@ static ftemanifest_t *FS_Manifest_Clone(ftemanifest_t *oldm)
|
|||
newm->formalname = Z_StrDup(oldm->formalname);
|
||||
if (oldm->protocolname)
|
||||
newm->protocolname = Z_StrDup(oldm->protocolname);
|
||||
if (oldm->defaultexec)
|
||||
newm->defaultexec = Z_StrDup(oldm->defaultexec);
|
||||
|
||||
for (i = 0; i < sizeof(newm->gamepath) / sizeof(newm->gamepath[0]); i++)
|
||||
{
|
||||
|
@ -236,15 +238,18 @@ static ftemanifest_t *FS_Manifest_Clone(ftemanifest_t *oldm)
|
|||
|
||||
void FS_Manifest_Print(ftemanifest_t *man)
|
||||
{
|
||||
char buffer[1024];
|
||||
int i, j;
|
||||
if (man->updateurl)
|
||||
Con_Printf("updateurl \"%s\"\n", man->updateurl);
|
||||
Con_Printf("updateurl \"%s\"\n", COM_QuotedString(man->updateurl, buffer, sizeof(buffer)));
|
||||
if (man->installation)
|
||||
Con_Printf("game \"%s\"\n", man->installation);
|
||||
Con_Printf("game \"%s\"\n", COM_QuotedString(man->installation, buffer, sizeof(buffer)));
|
||||
if (man->formalname)
|
||||
Con_Printf("name \"%s\"\n", man->formalname);
|
||||
Con_Printf("name \"%s\"\n", COM_QuotedString(man->formalname, buffer, sizeof(buffer)));
|
||||
if (man->protocolname)
|
||||
Con_Printf("protocolname \"%s\"\n", man->protocolname);
|
||||
Con_Printf("protocolname \"%s\"\n", COM_QuotedString(man->protocolname, buffer, sizeof(buffer)));
|
||||
if (man->defaultexec)
|
||||
Con_Printf("defaultexec %s\n", COM_QuotedString(man->defaultexec, buffer, sizeof(buffer)));
|
||||
|
||||
for (i = 0; i < sizeof(man->gamepath) / sizeof(man->gamepath[0]); i++)
|
||||
{
|
||||
|
@ -322,6 +327,11 @@ static void FS_Manifest_ParseTokens(ftemanifest_t *man)
|
|||
Z_Free(man->protocolname);
|
||||
man->protocolname = Z_StrDup(Cmd_Argv(1));
|
||||
}
|
||||
else if (!stricmp(fname, "defaultexec"))
|
||||
{
|
||||
Z_Free(man->defaultexec);
|
||||
man->defaultexec = Z_StrDup(Cmd_Argv(1));
|
||||
}
|
||||
else if (!stricmp(fname, "basegame") || !stricmp(fname, "gamedir"))
|
||||
{
|
||||
int i;
|
||||
|
|
|
@ -1613,6 +1613,16 @@ void Plug_Close(plugin_t *plug)
|
|||
}
|
||||
|
||||
Con_Printf("Closing plugin %s\n", plug->name);
|
||||
|
||||
//ensure any active contexts provided by the plugin are closed (stuff with destroy callbacks)
|
||||
#if defined(PLUGINS) && !defined(NOMEDIA) && !defined(SERVERONLY)
|
||||
Media_UnregisterDecoder(plug, NULL);
|
||||
Media_UnregisterEncoder(plug, NULL);
|
||||
#endif
|
||||
FS_UnRegisterFileSystemModule(plug);
|
||||
|
||||
//tell the plugin that everything is closed and that it should free up any lingering memory/stuff
|
||||
//it is still allowed to create/have open files.
|
||||
if (plug->shutdown)
|
||||
{
|
||||
plugin_t *cp = currentplug;
|
||||
|
@ -1620,13 +1630,10 @@ void Plug_Close(plugin_t *plug)
|
|||
VM_Call(plug->vm, plug->shutdown);
|
||||
currentplug = cp;
|
||||
}
|
||||
#if defined(PLUGINS) && !defined(NOMEDIA) && !defined(SERVERONLY)
|
||||
Media_UnregisterDecoder(plug, NULL);
|
||||
Media_UnregisterEncoder(plug, NULL);
|
||||
#endif
|
||||
FS_UnRegisterFileSystemModule(plug);
|
||||
|
||||
VM_Destroy(plug->vm);
|
||||
|
||||
//make sure anything else that was left is unlinked (stuff without destroy callbacks).
|
||||
for (i = 0; i < pluginstreamarraylen; i++)
|
||||
{
|
||||
if (pluginstreamarray[i].plugin == plug)
|
||||
|
|
|
@ -65,7 +65,9 @@ uniform sampler2D s_t1; //lightmap0
|
|||
#if defined(BUMP) && (defined(OFFSETMAPPING) || defined(DELUXE) || defined(SPECULAR))
|
||||
uniform sampler2D s_t2; //normal.rgb+height.a
|
||||
#endif
|
||||
#ifdef DELUXE
|
||||
uniform sampler2D s_t3; //deluxe0
|
||||
#endif
|
||||
#ifdef FULLBRIGHT
|
||||
uniform sampler2D s_t4; //fullbright
|
||||
#endif
|
||||
|
|
|
@ -237,7 +237,8 @@ static void *Dec_DisplayFrame(void *vctx, qboolean nosound, enum uploadfmt_e *fm
|
|||
static void Dec_Destroy(void *vctx)
|
||||
{
|
||||
decctx *ctx = (decctx*)vctx;
|
||||
ctx->wnd->destroy();
|
||||
if (inited) //make sure things don't happen in the wrong order. we can still leak though
|
||||
ctx->wnd->destroy();
|
||||
delete ctx;
|
||||
}
|
||||
static void Dec_GetSize (void *vctx, int *width, int *height)
|
||||
|
@ -412,6 +413,7 @@ static qintptr_t Dec_Shutdown(qintptr_t *args)
|
|||
|
||||
static media_decoder_funcs_t decoderfuncs =
|
||||
{
|
||||
"berkelium",
|
||||
Dec_Create,
|
||||
Dec_DisplayFrame,
|
||||
NULL,//doneframe
|
||||
|
@ -434,8 +436,8 @@ extern "C" qintptr_t Plug_Init(qintptr_t *args)
|
|||
}
|
||||
if (!Plug_Export("Shutdown", Dec_Shutdown))
|
||||
{
|
||||
Con_Printf("Berkelium plugin warning: Engine doesn't support Shutdown feature\n");
|
||||
// return false;
|
||||
Con_Printf("Berkelium plugin failed: Engine doesn't support Shutdown feature\n");
|
||||
return false;
|
||||
}
|
||||
if (!Plug_ExportNative("Media_VideoDecoder", &decoderfuncs))
|
||||
{
|
||||
|
|
|
@ -10,6 +10,7 @@ typedef enum uploadfmt_e
|
|||
|
||||
typedef struct
|
||||
{
|
||||
char *drivername;
|
||||
void *(QDECL *createdecoder)(char *name); //needed
|
||||
void *(QDECL *decodeframe)(void *ctx, qboolean nosound, uploadfmt_t *fmt, int *width, int *height); //needed
|
||||
void (QDECL *doneframe)(void *ctx, void *img); //basically a free()
|
||||
|
@ -26,6 +27,7 @@ typedef struct
|
|||
|
||||
typedef struct
|
||||
{
|
||||
char *drivername;
|
||||
void *(QDECL *capture_begin) (char *streamname, int videorate, int width, int height, int *sndkhz, int *sndchannels, int *sndbits);
|
||||
void (QDECL *capture_video) (void *ctx, void *data, int frame, int width, int height);
|
||||
void (QDECL *capture_audio) (void *ctx, void *data, int bytes);
|
||||
|
|
Loading…
Reference in a new issue