diff options
author | Juan J. Martinez <jjm@usebox.net> | 2023-08-10 12:09:06 +0100 |
---|---|---|
committer | Juan J. Martinez <jjm@usebox.net> | 2023-08-10 12:09:06 +0100 |
commit | cd2296358a03ab9ca4d6c017262735eaa63b5fdb (patch) | |
tree | ae8f4c39e5936556a93a9468b98e4eb7eecdadca /src/main.c | |
parent | b26a8cb5ba0c6d4e766ea0de3505fe39e542ee5e (diff) | |
download | gold-mine-run-cd2296358a03ab9ca4d6c017262735eaa63b5fdb.tar.gz gold-mine-run-cd2296358a03ab9ca4d6c017262735eaa63b5fdb.zip |
Don't use the "nos" driver1.1
This fixes:
- crash when exiting after running the game with the no sound (nos)
driver
- occasional "pauses" when running the game with no sound
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -14,7 +14,7 @@ #include "game.h" #define GAME_NAME "Gold Mine Run!" -#define GAME_VERSION "1.0 (2023-08-08)" +#define GAME_VERSION "1.1 (2023-08-10)" #define GAME_URL "https://www.usebox.net/jjm/gold-mine-run/" /* disable paging because our int handlers are written in C */ @@ -66,7 +66,7 @@ int main(int argc, char *argv[]) } } - if (!sound_init(nosound)) + if (!nosound && !sound_init()) { fprintf(stderr, "ERROR: failed to init sound\n"); return 1; @@ -80,7 +80,8 @@ int main(int argc, char *argv[]) control_init(); /* to update mikmod */ - timer_user_fn(sound_update); + if (!nosound) + timer_user_fn(sound_update); /* set VGA 320x200, 256 col */ if (!set_mode(0x13)) |