summaryrefslogtreecommitdiff
path: root/sys/src/games/doom/d_main.c
diff options
context:
space:
mode:
authorqwx <devnull@localhost>2018-07-15 06:31:45 +0200
committerqwx <devnull@localhost>2018-07-15 06:31:45 +0200
commite7b1c1aad896c131fb30b6b0836ff65a63a6eae3 (patch)
tree38445c9897b78acc8af034f448e893373f76aec9 /sys/src/games/doom/d_main.c
parent1a751a59393ad696cdd7f6db882e3d0118e0b54e (diff)
doom: use wadfs to expose music lumps
launch wadfs after detecting main wad, exposing GENMIDI and music lumps under /mnt/wad. /bin/dmus can then use them directly, and wadfs doesn't need to be started manually.
Diffstat (limited to 'sys/src/games/doom/d_main.c')
-rw-r--r--sys/src/games/doom/d_main.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/src/games/doom/d_main.c b/sys/src/games/doom/d_main.c
index 6f1e86215..706306912 100644
--- a/sys/src/games/doom/d_main.c
+++ b/sys/src/games/doom/d_main.c
@@ -635,6 +635,11 @@ void IdentifyVersion (void)
gamemode = indetermined;
return;
}
+ if(gamemode != indetermined && rfork(RFPROC|RFFDG) == 0){
+ close(2);
+ execl("/bin/games/wadfs", "wadfs", wadfile, nil);
+ sysfatal("execl: %r");
+ }
strncpy(basedefault, wadfile, sizeof(basedefault)-5);
basedefault[sizeof(basedefault)-5] = '\0';
slash = strrchr(basedefault, '/');