projects
/
dosdemo
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
removed clang-format and clang_complete files from the repo
[dosdemo]
/
src
/
glut
/
audio.c
diff --git
a/src/glut/audio.c
b/src/glut/audio.c
index
c776d3b
..
6a7b96c
100644
(file)
--- a/
src/glut/audio.c
+++ b/
src/glut/audio.c
@@
-9,6
+9,7
@@
#endif
#include "mikmod.h"
#include "audio.h"
#endif
#include "mikmod.h"
#include "audio.h"
+#include "cfgopt.h"
#ifdef _WIN32
#include <windows.h>
#ifdef _WIN32
#include <windows.h>
@@
-37,6
+38,8
@@
int au_init(void)
curmod = 0;
vol_master = vol_mus = vol_sfx = 255;
curmod = 0;
vol_master = vol_mus = vol_sfx = 255;
+ if(!opt.music) return 0;
+
#if defined(__linux__)
MikMod_RegisterDriver(&drv_alsa);
#elif defined(__FreeBSD__)
#if defined(__linux__)
MikMod_RegisterDriver(&drv_alsa);
#elif defined(__FreeBSD__)
@@
-63,7
+66,7
@@
int au_init(void)
{
#ifdef _WIN32
HANDLE thr;
{
#ifdef _WIN32
HANDLE thr;
- if((thr = CreateThread(0, 0, update, 0, 0, 0))) {
+ if((thr = CreateThread(0, 0, upd_thread, 0, 0, 0))) {
CloseHandle(thr);
}
#else
CloseHandle(thr);
}
#else
@@
-78,8
+81,10
@@
int au_init(void)
void au_shutdown(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)
}
struct au_module *au_load_module(const char *fname)
@@
-169,7
+174,7
@@
void au_update(void)
}
#ifdef _WIN32
}
#ifdef _WIN32
-static DWORD WINAPI upd_thread(void *cls);
+static DWORD WINAPI upd_thread(void *cls)
#else
static void *update(void *cls)
#endif
#else
static void *update(void *cls)
#endif