projects
/
dosdemo
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2eb6ea4
)
glut backend: don't attempt to init sound if opt.music is false
author
John Tsiombikas
<nuclear@member.fsf.org>
Wed, 11 May 2022 01:27:57 +0000
(
04:27
+0300)
committer
John Tsiombikas
<nuclear@member.fsf.org>
Wed, 11 May 2022 01:27:57 +0000
(
04:27
+0300)
src/glut/audio.c
patch
|
blob
|
history
diff --git
a/src/glut/audio.c
b/src/glut/audio.c
index
a7ea50c
..
6a7b96c
100644
(file)
--- a/
src/glut/audio.c
+++ b/
src/glut/audio.c
@@
-9,6
+9,7
@@
#endif
#include "mikmod.h"
#include "audio.h"
+#include "cfgopt.h"
#ifdef _WIN32
#include <windows.h>
@@
-37,6
+38,8
@@
int au_init(void)
curmod = 0;
vol_master = vol_mus = vol_sfx = 255;
+ if(!opt.music) return 0;
+
#if defined(__linux__)
MikMod_RegisterDriver(&drv_alsa);
#elif defined(__FreeBSD__)
@@
-78,8
+81,10
@@
int au_init(void)
void au_shutdown(void)
{
- curmod = 0;
- MikMod_Exit();
+ if(opt.music) {
+ curmod = 0;
+ MikMod_Exit();
+ }
}
struct au_module *au_load_module(const char *fname)