nacl tweaks to get it working again.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4519 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2013-11-06 21:55:56 +00:00
parent c17aa5f9a5
commit 47fa0b93d2
2 changed files with 10 additions and 4 deletions

View File

@ -717,28 +717,34 @@ ifeq ($(FTE_TARGET),nacl)
CC=$(NACL_SDK_ROOT)/toolchain/$(MYOS)_x86_newlib/bin/i686-nacl-gcc -DNACL -m32
STRIP=$(NACL_SDK_ROOT)/toolchain/$(MYOS)_x86_newlib/bin/i686-nacl-strip
BITS=
NACLLIBS=newlib_x86_32/Release
endif
ifeq ($(NARCH),x86_64)
CC=$(NACL_SDK_ROOT)/toolchain/$(MYOS)_x86_newlib/bin/i686-nacl-gcc -DNACL -m64
STRIP=$(NACL_SDK_ROOT)/toolchain/$(MYOS)_x86_newlib/bin/i686-nacl-strip
BITS=
NACLLIBS=newlib_x86_64/Release
endif
ifeq ($(NARCH),arm)
CC=$(NACL_SDK_ROOT)/toolchain/$(MYOS)_arm_newlib/bin/arm-nacl-gcc -DNACL
CC=NACL_SDK_ROOT/toolchain/$(MYOS)_arm_newlib/bin/arm-nacl-gcc -DNACL
STRIP=$(NACL_SDK_ROOT)/toolchain/$(MYOS)_arm_newlib/bin/arm-nacl-strip
BITS=
NACLLIBS=newlib_arm/Release
endif
ifeq ($(NARCH),pnacl)
CC=$(NACL_SDK_ROOT)/toolchain/$(MYOS)_x86_pnacl/newlib/bin/pnacl-clang -DNACL
STRIP=$(NACL_SDK_ROOT)/toolchain/$(MYOS)_x86_pnacl/newlib/bin/pnacl-strip
STRIPFLAGS=
BITS=
NACLLIBS=pnacl/Release
endif
BASELDFLAGS = -lm -lppapi_gles2 -lnosys -lppapi
IMAGELDFLAGS =
GL_CFLAGS+=$(SPEEXCFLAGS)
GL_CFLAGS+=-I$(realpath $(NACL_SDK_ROOT)/include)
BASELDFLAGS+=-L$(realpath $(NACL_SDK_ROOT)/lib/$(NACLLIBS))
GLCL_OBJS=$(GL_OBJS) $(D3DGL_OBJS) $(GLQUAKE_OBJS) $(SPEEX_OBJS) sys_ppapi.o cd_null.o gl_vidppapi.o fs_ppapi.o snd_ppapi.o

View File

@ -200,7 +200,7 @@ static void dlstarted(void* user_data, int32_t result)
readfinished(user_data, urlloader->ReadResponseBody(ctx->req, ctx->buffer, sizeof(ctx->buffer), ccb));
}
static void nadl_cleanup(void* user_data, int32_t result)
static void nadl_cleanup_cb(void* user_data, int32_t result)
{
struct nacl_dl *ctx = user_data;
@ -217,7 +217,7 @@ void NADL_Cleanup(struct dl_download *dl)
//so set up a callback to do it later
dl->ctx = NULL; //orphan
struct PP_CompletionCallback ccb = {nadl_cleanup, ctx, PP_COMPLETIONCALLBACK_FLAG_NONE};
struct PP_CompletionCallback ccb = {nadl_cleanup_cb, ctx, PP_COMPLETIONCALLBACK_FLAG_NONE};
ppb_core->CallOnMainThread(1000, ccb, 0);
}
@ -230,7 +230,7 @@ qboolean DL_Decide(struct dl_download *dl)
if (dl->postdata)
{
DL_Abort(dl);
NADL_Cleanup(dl);
return false; //safe to destroy it now
}