smoother console scrolling (at least with the mouse)
support RLE+luminance+alpha tga files. support half-float tga files. recognise hdr astc images. added appropriate fallbacks for astc support. load mip-less .astc files (mostly just for debugging stuff). allow packages to warn about required engine/gpu features. catch when stdin flags get changed to blocking by external libraries, to avoid fatal stalls. basic support for .mdx files (kingpin models) sort packages loaded via wildcards, by datetime then name, to avoid random ordering from certain filesystems. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5531 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
d561772bb0
commit
41b0d993f2
48 changed files with 5118 additions and 1466 deletions
|
@ -275,9 +275,6 @@ void Sys_Sleep (double seconds)
|
|||
#include <fcntl.h>
|
||||
#include <errno.h>
|
||||
#include <sys/wait.h>
|
||||
#define STDIN 0
|
||||
#define STDOUT 1
|
||||
#define STDERR 2
|
||||
|
||||
typedef struct slaveserver_s
|
||||
{
|
||||
|
@ -386,10 +383,10 @@ pubsubserver_t *Sys_ForkServer(void)
|
|||
|
||||
if (!pid)
|
||||
{ //this is the child
|
||||
dup2(toslave[0], STDIN);
|
||||
dup2(toslave[0], STDIN_FILENO);
|
||||
close(toslave[1]);
|
||||
close(toslave[0]);
|
||||
dup2(tomaster[1], STDOUT);
|
||||
dup2(tomaster[1], STDOUT_FILENO);
|
||||
|
||||
isClusterSlave = true;
|
||||
|
||||
|
@ -459,9 +456,9 @@ pubsubserver_t *Sys_ForkServer(void)
|
|||
posix_spawn_file_actions_addclose(&action, toslave[1]);
|
||||
posix_spawn_file_actions_addclose(&action, tomaster[0]);
|
||||
|
||||
posix_spawn_file_actions_adddup2(&action, toslave[0], STDIN);
|
||||
posix_spawn_file_actions_adddup2(&action, tomaster[1], STDOUT);
|
||||
// posix_spawn_file_actions_adddup2(&action, tomaster[1], STDERR);
|
||||
posix_spawn_file_actions_adddup2(&action, toslave[0], STDIN_FILENO);
|
||||
posix_spawn_file_actions_adddup2(&action, tomaster[1], STDOUT_FILENO);
|
||||
// posix_spawn_file_actions_adddup2(&action, tomaster[1], STDERR_FILENO);
|
||||
|
||||
posix_spawn_file_actions_addclose(&action, toslave[0]);
|
||||
posix_spawn_file_actions_addclose(&action, tomaster[1]);
|
||||
|
@ -481,7 +478,7 @@ pubsubserver_t *Sys_ForkServer(void)
|
|||
|
||||
void Sys_InstructMaster(sizebuf_t *cmd)
|
||||
{
|
||||
write(STDOUT, cmd->data, cmd->cursize);
|
||||
write(STDOUT_FILENO, cmd->data, cmd->cursize);
|
||||
|
||||
//FIXME: handle partial writes.
|
||||
}
|
||||
|
@ -490,6 +487,16 @@ void SSV_CheckFromMaster(void)
|
|||
{
|
||||
static char inbuffer[1024];
|
||||
static int inbufsize;
|
||||
|
||||
#if defined(__linux__) && defined(_DEBUG)
|
||||
int fl = fcntl (STDIN_FILENO, F_GETFL, 0);
|
||||
if (!(fl & FNDELAY))
|
||||
{
|
||||
fcntl(STDIN_FILENO, F_SETFL, fl | FNDELAY);
|
||||
Sys_Printf(CON_WARNING "stdin flags became blocking - gdb bug?\n");
|
||||
}
|
||||
#endif
|
||||
|
||||
for(;;)
|
||||
{
|
||||
if(inbufsize >= 2)
|
||||
|
@ -517,7 +524,7 @@ void SSV_CheckFromMaster(void)
|
|||
}
|
||||
|
||||
{
|
||||
ssize_t avail = read(STDIN, inbuffer+inbufsize, sizeof(inbuffer)-inbufsize);
|
||||
ssize_t avail = read(STDIN_FILENO, inbuffer+inbufsize, sizeof(inbuffer)-inbufsize);
|
||||
if (!avail)
|
||||
{ //eof
|
||||
SV_FinalMessage("Cluster shut down\n");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue