diff options
author | aiju <devnull@localhost> | 2018-07-03 07:22:19 +0000 |
---|---|---|
committer | aiju <devnull@localhost> | 2018-07-03 07:22:19 +0000 |
commit | ac891003ea8e1220d4bc79d8bb8ea56564703179 (patch) | |
tree | 2a9a025929ef1137ad255672e825aacbb8b4c1e2 /sys/src/games | |
parent | 2e05af858ec745ffc174e503148ef7928f697c22 (diff) |
games/mines: add missing checks for UseGhost
Diffstat (limited to 'sys/src/games')
-rw-r--r-- | sys/src/games/mines/mines.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/src/games/mines/mines.c b/sys/src/games/mines/mines.c index 80d3f3e94..f28c2c73d 100644 --- a/sys/src/games/mines/mines.c +++ b/sys/src/games/mines/mines.c @@ -534,7 +534,7 @@ void main(int argc, char **argv) { Event Event; Point CurrentCell, Cell = Pt(-1, -1); - GhostInit(); + if(UseGhost) GhostInit(); Etimer = etimer(0, UseGhost ? 10 : 1000); LastAction = nsec(); @@ -543,7 +543,7 @@ void main(int argc, char **argv) { if(Key == Etimer) { - if(nsec() - LastAction > 1000000000ULL && LastMouse.buttons == 0) + if(UseGhost && nsec() - LastAction > 1000000000ULL && LastMouse.buttons == 0) GhostMode(); if(++Counter == (UseGhost ? 100 : 1)){ @@ -558,7 +558,7 @@ void main(int argc, char **argv) { if(Key == Emouse) { - if(!GhostCheck(Event.mouse.xy) || LastMouse.buttons != Event.mouse.buttons){ + if(UseGhost && !GhostCheck(Event.mouse.xy) || LastMouse.buttons != Event.mouse.buttons){ LastAction = nsec(); LastMouse = Event.mouse; GhostReset(Event.mouse.buttons != 0); @@ -668,7 +668,7 @@ void main(int argc, char **argv) { if(Key == Ekeyboard) { LastAction = nsec(); - GhostReset(1); + if(UseGhost) GhostReset(1); switch(Event.kbdc) { case 'n': |