summaryrefslogtreecommitdiff
path: root/sys/src/games
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2016-01-30 19:11:33 +0100
committercinap_lenrek <cinap_lenrek@felloff.net>2016-01-30 19:11:33 +0100
commit340d83d49d659b53e711ab59d6e819be39a0ad16 (patch)
treef2a934378e3f9559d61a8e902b3209cb8a303269 /sys/src/games
parent7cfe4aef3c85aee813c2d3e712f94a319abba1c3 (diff)
games/doom: fix white window issue on exit
make kbdproc() and mouseproc() share fd table with the main proc and not explicitely close the file descriptors. so /dev/mouse gets closed *after* /dev/draw/new to avoid the white window refresh issue.
Diffstat (limited to 'sys/src/games')
-rw-r--r--sys/src/games/doom/i_video.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/src/games/doom/i_video.c b/sys/src/games/doom/i_video.c
index 73ab0b2d1..334ef567e 100644
--- a/sys/src/games/doom/i_video.c
+++ b/sys/src/games/doom/i_video.c
@@ -46,13 +46,13 @@ void I_InitGraphics(void)
center = addpt(screen->r.min, Pt(Dx(screen->r)/2, Dy(screen->r)/2));
grabout = insetrect(screen->r, Dx(screen->r)/8);
- if((pid = rfork(RFPROC|RFMEM|RFFDG)) == 0){
+ if((pid = rfork(RFPROC|RFMEM)) == 0){
kbdproc();
exits(nil);
}
kbdpid = pid;
- if((pid = rfork(RFPROC|RFMEM|RFFDG)) == 0){
+ if((pid = rfork(RFPROC|RFMEM)) == 0){
mouseproc();
exits(nil);
}
@@ -300,7 +300,6 @@ kbdproc(void)
}
strcpy(buf2, buf);
}
- close(kfd);
}
static void
@@ -356,6 +355,5 @@ mouseproc(void)
break;
}
}
- close(fd);
}