- Add new trueror1.map that showcases the functionality and limitations of

the additional rendering pass
- Remove r_preview_mouseaim cvar from the game, since it's only for Mapster
- sdlmusic.c: (Failed) attempt to fix a call of waitpid() with a non-existent
  process ID in the external MIDI playing code. I think there's a race there...

git-svn-id: https://svn.eduke32.com/eduke32@2025 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2011-09-15 17:04:37 +00:00
parent 2415b03c79
commit cc7110c18f
4 changed files with 19 additions and 9 deletions

View file

@ -6398,6 +6398,9 @@ void polymost_initosdfuncs(void)
for (i=0; i<sizeof(cvars_polymost)/sizeof(cvars_polymost[0]); i++) for (i=0; i<sizeof(cvars_polymost)/sizeof(cvars_polymost[0]); i++)
{ {
if (editstatus==0 && !Bstrcmp(cvars_polymost[i].name, "r_preview_mouseaim"))
continue;
if (OSD_RegisterCvar(&cvars_polymost[i])) if (OSD_RegisterCvar(&cvars_polymost[i]))
continue; continue;

Binary file not shown.

View file

@ -2907,7 +2907,7 @@ dodefault:
} }
drawlinepat = m32_drawlinepat; drawlinepat = m32_drawlinepat;
drawline16(xofs+x1,yofs+y1, xofs+x2,yofs+y2, col>=0?editorcolors[col&15]:(-col&255)); drawline16(xofs+x1,yofs+y1, xofs+x2,yofs+y2, col>=0?editorcolors[col&15]:((-col)&255));
drawlinepat = odrawlinepat; drawlinepat = odrawlinepat;
continue; continue;
} }
@ -2935,7 +2935,7 @@ dodefault:
} }
drawlinepat = m32_drawlinepat; drawlinepat = m32_drawlinepat;
drawcircle16(xofs+x1, yofs+y1, r, eccen, col>=0?editorcolors[col&15]:(-col&255)); drawcircle16(xofs+x1, yofs+y1, r, eccen, col>=0?editorcolors[col&15]:((-col)&255));
drawlinepat = odrawlinepat; drawlinepat = odrawlinepat;
continue; continue;
} }

View file

@ -342,11 +342,15 @@ int32_t MUSIC_StopSong(void)
if (external_midi_pid > 0) if (external_midi_pid > 0)
{ {
int32_t ret; int32_t ret;
struct timespec ts;
external_midi_restart = 0; // make SIGCHLD handler a no-op external_midi_restart = 0; // make SIGCHLD handler a no-op
ts.tv_sec = 0;
ts.tv_nsec = 5000000; // sleep 5ms at most
kill(external_midi_pid, SIGTERM); kill(external_midi_pid, SIGTERM);
nanosleep(&(const struct timespec) { .tv_sec=0, .tv_nsec=5000000 }, NULL); // sleep 5ms at most nanosleep(&ts, NULL);
ret = waitpid(external_midi_pid, NULL, WNOHANG|WUNTRACED); ret = waitpid(external_midi_pid, NULL, WNOHANG|WUNTRACED);
// printf("(%d)", ret); // printf("(%d)", ret);
@ -419,13 +423,16 @@ static void sigchld_handler(int signo)
{ {
int status; int status;
if (waitpid(external_midi_pid, &status, WUNTRACED)==-1) if (external_midi_pid > 0)
perror("waitpid (3)");
if (WIFEXITED(status) && WEXITSTATUS(status)==0)
{ {
// loop ... if (waitpid(external_midi_pid, &status, WUNTRACED)==-1)
playmusic(); perror("waitpid (3)");
if (WIFEXITED(status) && WEXITSTATUS(status)==0)
{
// loop ...
playmusic();
}
} }
} }
} }