1
0
Fork 0
forked from fte/fteqw

fix non-windows ports.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4503 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2013-10-09 01:00:24 +00:00
parent 73d82ddf13
commit 7f8bdb4cfa
5 changed files with 18 additions and 5 deletions

View file

@ -196,7 +196,7 @@ void Media_EndedTrack(void)
cdplayingtrack = 0; cdplayingtrack = 0;
cdpausedtrack = 0; cdpausedtrack = 0;
if (cdloopingtrack) if (*cdloopingtrack)
Media_BackgroundTrack(cdloopingtrack, cdloopingtrack); Media_BackgroundTrack(cdloopingtrack, cdloopingtrack);
} }
@ -536,9 +536,9 @@ void CD_f (void)
{ {
Con_Printf("%u tracks\n", cdnumtracks); Con_Printf("%u tracks\n", cdnumtracks);
if (cdplayingtrack > 0) if (cdplayingtrack > 0)
Con_Printf("Currently %s track %u\n", cdloopingtrack ? "looping" : "playing", cdplayingtrack); Con_Printf("Currently %s track %u\n", *cdloopingtrack ? "looping" : "playing", cdplayingtrack);
else if (cdpausedtrack > 0) else if (cdpausedtrack > 0)
Con_Printf("Paused %s track %u\n", cdloopingtrack ? "looping" : "playing", cdpausedtrack); Con_Printf("Paused %s track %u\n", *cdloopingtrack ? "looping" : "playing", cdpausedtrack);
return; return;
} }
} }

View file

@ -835,6 +835,7 @@ static void QCBUILTIN PF_R_DynamicLight_Set(pubprogfuncs_t *prinst, struct globa
else else
l->cubetexture = r_nulltex; l->cubetexture = r_nulltex;
break; break;
#ifdef RTLIGHTS
case lfield_ambientscale: case lfield_ambientscale:
l->lightcolourscales[0] = G_FLOAT(OFS_PARM2); l->lightcolourscales[0] = G_FLOAT(OFS_PARM2);
break; break;
@ -844,6 +845,7 @@ static void QCBUILTIN PF_R_DynamicLight_Set(pubprogfuncs_t *prinst, struct globa
case lfield_specularscale: case lfield_specularscale:
l->lightcolourscales[2] = G_FLOAT(OFS_PARM2); l->lightcolourscales[2] = G_FLOAT(OFS_PARM2);
break; break;
#endif
default: default:
break; break;
} }
@ -894,6 +896,7 @@ static void QCBUILTIN PF_R_DynamicLight_Get(pubprogfuncs_t *prinst, struct globa
case lfield_cubemapname: case lfield_cubemapname:
RETURN_TSTRING(l->cubemapname); RETURN_TSTRING(l->cubemapname);
break; break;
#ifdef RTLIGHTS
case lfield_ambientscale: case lfield_ambientscale:
G_FLOAT(OFS_RETURN) = l->lightcolourscales[0]; G_FLOAT(OFS_RETURN) = l->lightcolourscales[0];
break; break;
@ -903,6 +906,7 @@ static void QCBUILTIN PF_R_DynamicLight_Get(pubprogfuncs_t *prinst, struct globa
case lfield_specularscale: case lfield_specularscale:
G_FLOAT(OFS_RETURN) = l->lightcolourscales[2]; G_FLOAT(OFS_RETURN) = l->lightcolourscales[2];
break; break;
#endif
default: default:
G_INT(OFS_RETURN) = 0; G_INT(OFS_RETURN) = 0;
break; break;

View file

@ -131,7 +131,7 @@ JNIEXPORT jint JNICALL Java_com_fteqw_FTEDroidEngine_frame(JNIEnv *env, jobject
#endif #endif
ret = 0; ret = 0;
if (key_dest == key_console || key_dest == key_message || (key_dest == key_game && cls.state == ca_disconnected) || sys_osk.ival) if (Key_Dest_Has(kdm_console|kdm_message) || (!Key_Dest_Has(~kdm_game) && cls.state == ca_disconnected) || sys_osk.ival)
ret |= 1; ret |= 1;
if (vibrateduration) if (vibrateduration)
ret |= 2; ret |= 2;

View file

@ -186,7 +186,14 @@ void *Z_MallocNamed(int size, char *file, int line)
#else #else
void *ZF_Malloc(int size) void *ZF_Malloc(int size)
{ {
#ifdef __linux__ #ifdef ANDROID
void *ret = NULL;
//android is linux, but not gnu and thus not posix...
ret = memalign(max(sizeof(float)*4, sizeof(void*)), size);
if (ret)
memset(ret, 0, size);
return ret;
#elif defined(__linux__)
void *ret = NULL; void *ret = NULL;
if (!posix_memalign(&ret, max(sizeof(float)*4, sizeof(void*)), size)) if (!posix_memalign(&ret, max(sizeof(float)*4, sizeof(void*)), size))
memset(ret, 0, size); memset(ret, 0, size);

View file

@ -1503,10 +1503,12 @@ void SV_SpawnServer (char *server, char *startspot, qboolean noents, qboolean us
} }
} }
} }
#ifdef Q3SERVER
if (svs.gametype == GT_QUAKE3) if (svs.gametype == GT_QUAKE3)
{ {
SVQ3_NewMapConnects(); SVQ3_NewMapConnects();
} }
#endif
FS_ReferenceControl(0, 0); FS_ReferenceControl(0, 0);