mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-29 23:22:01 +00:00
Fix a couple of bugs that I didn't catch.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4597 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
1bb752b582
commit
9140cccb9f
4 changed files with 30 additions and 28 deletions
|
@ -761,7 +761,9 @@ struct ziplocalentry
|
|||
|
||||
#define SIZE_LOCALENTRY 30
|
||||
#define SIZE_ENDOFCENTRALDIRECTORY 22
|
||||
#define SIZE_ZIP64ENDOFCENTRALDIRECTORY 56
|
||||
#define SIZE_ZIP64ENDOFCENTRALDIRECTORY_V1 56
|
||||
#define SIZE_ZIP64ENDOFCENTRALDIRECTORY_V2 84
|
||||
#define SIZE_ZIP64ENDOFCENTRALDIRECTORY SIZE_ZIP64ENDOFCENTRALDIRECTORY_V2
|
||||
#define SIZE_ZIP64ENDOFCENTRALDIRECTORYLOCATOR 20
|
||||
|
||||
//check the local header and determine the place the data actually starts.
|
||||
|
|
|
@ -2157,11 +2157,11 @@ int FTENET_GetLocalAddress(int port, qboolean ipx, qboolean ipv4, qboolean ipv6,
|
|||
|
||||
static struct ifaddrs *iflist;
|
||||
unsigned int iftime; //requery sometimes.
|
||||
int FTENET_GetLocalAddress(netadr_t *out, int port, int count, qboolean ipx, qboolean ipv4, qboolean ipv6)
|
||||
int FTENET_GetLocalAddress(int port, qboolean ipx, qboolean ipv4, qboolean ipv6, unsigned int *adrflags, netadr_t *addresses, int maxaddresses)
|
||||
{
|
||||
struct ifaddrs *ifa;
|
||||
int fam;
|
||||
int idx;
|
||||
int idx = 0;
|
||||
unsigned int time = Sys_Milliseconds();
|
||||
if (time - iftime > 1000 && iflist)
|
||||
{
|
||||
|
@ -2174,7 +2174,7 @@ int FTENET_GetLocalAddress(netadr_t *out, int port, int count, qboolean ipx, qbo
|
|||
getifaddrs(&iflist);
|
||||
}
|
||||
|
||||
for (ifa = iflist; ifa; ifa = ifa->ifa_next)
|
||||
for (ifa = iflist; ifa && idx < maxaddresses; ifa = ifa->ifa_next)
|
||||
{
|
||||
//can happen if the interface is not bound.
|
||||
if (ifa->ifa_addr == NULL)
|
||||
|
@ -2194,17 +2194,16 @@ int FTENET_GetLocalAddress(netadr_t *out, int port, int count, qboolean ipx, qbo
|
|||
#endif
|
||||
0)
|
||||
{
|
||||
if (idx++ == count)
|
||||
{
|
||||
SockadrToNetadr(&ifa->ifa_addr, out);
|
||||
out->port = port;
|
||||
}
|
||||
SockadrToNetadr(&ifa->ifa_addr, addresses[idx]);
|
||||
addresses[idx]->port = port;
|
||||
adrflags[idx] = 0;
|
||||
idx++;
|
||||
}
|
||||
}
|
||||
return idx;
|
||||
}
|
||||
#else
|
||||
int FTENET_GetLocalAddress(netadr_t *out, int count)
|
||||
int FTENET_GetLocalAddress(int port, qboolean ipx, qboolean ipv4, qboolean ipv6, unsigned int *adrflags, netadr_t *addresses, int maxaddresses)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -221,10 +221,10 @@ void GLVID_DeInit (void)
|
|||
SDL_SetWindowGammaRamp(sdlwindow, NULL, NULL, NULL);
|
||||
SDL_GL_DeleteContext(sdlcontext);
|
||||
SDL_DestroyWindow(sdlwindow);
|
||||
sdlwindow = NULL;
|
||||
#else
|
||||
SDL_SetGammaRamp (intitialgammaramps[0], intitialgammaramps[1], intitialgammaramps[2]);
|
||||
#endif
|
||||
sdlwindow = NULL;
|
||||
|
||||
SDL_QuitSubSystem(SDL_INIT_VIDEO);
|
||||
}
|
||||
|
|
|
@ -586,6 +586,24 @@ mfog_t *CM_FogForOrigin(vec3_t org);
|
|||
#define BEF_FORCECOLOURMOD 256 //q3 shaders default to 'rgbgen identity', and ignore ent colours. this forces ent colours to be considered
|
||||
#define BEF_LINES 512 //draw line pairs instead of triangles.
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int fbo;
|
||||
int rb_size[2];
|
||||
int rb_depth;
|
||||
int rb_stencil;
|
||||
int rb_depthstencil;
|
||||
texid_t colour;
|
||||
unsigned int enables;
|
||||
} fbostate_t;
|
||||
#define FBO_RB_COLOUR 1
|
||||
#define FBO_RB_DEPTH 2
|
||||
#define FBO_RB_STENCIL 4
|
||||
#define FBO_RESET 8 //resize all renderbuffers / free any that are not active. implied if the sizes differ
|
||||
#define FBO_TEX_COLOUR 16 //internal
|
||||
#define FBO_TEX_DEPTH 32 //internal
|
||||
#define FBO_TEX_STENCIL 64 //internal
|
||||
|
||||
#ifdef GLQUAKE
|
||||
void GLBE_Init(void);
|
||||
void GLBE_Shutdown(void);
|
||||
|
@ -610,23 +628,6 @@ void GLBE_VBO_Data(vbobctx_t *ctx, void *data, unsigned int size, vboarray_t *va
|
|||
void GLBE_VBO_Finish(vbobctx_t *ctx, void *edata, unsigned int esize, vboarray_t *earray);
|
||||
void GLBE_VBO_Destroy(vboarray_t *vearray);
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int fbo;
|
||||
int rb_size[2];
|
||||
int rb_depth;
|
||||
int rb_stencil;
|
||||
int rb_depthstencil;
|
||||
texid_t colour;
|
||||
unsigned int enables;
|
||||
} fbostate_t;
|
||||
#define FBO_RB_COLOUR 1
|
||||
#define FBO_RB_DEPTH 2
|
||||
#define FBO_RB_STENCIL 4
|
||||
#define FBO_RESET 8 //resize all renderbuffers / free any that are not active. implied if the sizes differ
|
||||
#define FBO_TEX_COLOUR 16 //internal
|
||||
#define FBO_TEX_DEPTH 32 //internal
|
||||
#define FBO_TEX_STENCIL 64 //internal
|
||||
void GLBE_FBO_Sources(texid_t sourcecolour, texid_t sourcedepth);
|
||||
int GLBE_FBO_Push(fbostate_t *state);
|
||||
void GLBE_FBO_Pop(int oldfbo);
|
||||
|
|
Loading…
Reference in a new issue