projects
/
dosdemo
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
- fixed C89 compliance issues with the last commit (rlebitmap/minifx)
[dosdemo]
/
src
/
dos
/
timer.c
diff --git
a/src/dos/timer.c
b/src/dos/timer.c
index
d6c3b52
..
5492f0b
100644
(file)
--- a/
src/dos/timer.c
+++ b/
src/dos/timer.c
@@
-1,3
+1,8
@@
+/* for sound we use MIDAS, which takes over the PIT and we can't use it
+ * therefore only compile this file for NO_SOUND builds.
+ */
+#ifdef NO_SOUND
+
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
@@
-17,6
+22,7
@@
#include "pit8254.h"
#include "inttypes.h"
#include "util.h"
#include "pit8254.h"
#include "inttypes.h"
#include "util.h"
+#include "dosutil.h"
#define PIT_TIMER_INTR 8
#define DOS_TIMER_INTR 0x1c
#define PIT_TIMER_INTR 8
#define DOS_TIMER_INTR 0x1c
@@
-40,8
+46,6
@@
static void (INTERRUPT *prev_timer_intr)();
#define INTERRUPT
static _go32_dpmi_seginfo intr, prev_intr;
#define INTERRUPT
static _go32_dpmi_seginfo intr, prev_intr;
-
-#define outp(p, v) outportb(p, v)
#endif
static void INTERRUPT timer_irq();
#endif
static void INTERRUPT timer_irq();
@@
-174,3
+178,5
@@
static void INTERRUPT timer_irq()
/* send EOI to the PIC */
outp(PIC1_CMD, OCW2_EOI);
}
/* send EOI to the PIC */
outp(PIC1_CMD, OCW2_EOI);
}
+
+#endif /* NO_SOUND */