more compile under cygwin patches

This commit is contained in:
Chris Ison 2001-09-30 13:05:20 +00:00
parent 53529ae940
commit b0dc19310a
5 changed files with 30 additions and 8 deletions

View file

@ -54,7 +54,7 @@ case "$host_os" in
;; ;;
cygwin*) cygwin*)
cygwin=yes cygwin=yes
CPPFLAGS="$CPPFLAGS -mno-cygwin" CPPFLAGS="$CPPFLAGS -mwindows -mno-cygwin"
CPPFLAGS="$CPPFLAGS -I\$(top_srcdir)/include/win32" CPPFLAGS="$CPPFLAGS -I\$(top_srcdir)/include/win32"
CPPFLAGS="$CPPFLAGS -I\$(top_srcdir)/include/win32/resources" CPPFLAGS="$CPPFLAGS -I\$(top_srcdir)/include/win32/resources"
if test $host != $build; then if test $host != $build; then
@ -64,7 +64,8 @@ case "$host_os" in
RANLIB=$host_cpu-$host_os-ranlib RANLIB=$host_cpu-$host_os-ranlib
endian="little" endian="little"
fi fi
LDFLAGS="$LDFLAGS -mno-cygwin" LDFLAGS="$LDFLAGS -L/usr/local/lib"
LDFLAGS="$LDFLAGS -lSDL -mwindows -mno-cygwin"
;; ;;
esac esac

View file

@ -43,14 +43,18 @@
#undef LPCWAVEFORMATEX #undef LPCWAVEFORMATEX
#ifdef WINNT #ifdef WINNT
#undef WINNT #undef WINNT
#if 0
#include <dsound.h> #include <dsound.h>
#include <ddraw.h> #include <ddraw.h>
#endif
#define WINNT #define WINNT
#else #else
#include <windows.h> #include <windows.h>
#if 0
#include <dsound.h> #include <dsound.h>
#include <ddraw.h> #include <ddraw.h>
#endif #endif
#endif
#ifdef HAVE_MGRAPH_H #ifdef HAVE_MGRAPH_H
# include <mgraph.h> # include <mgraph.h>
@ -67,7 +71,7 @@
extern HINSTANCE global_hInstance; extern HINSTANCE global_hInstance;
extern int global_nCmdShow; extern int global_nCmdShow;
#if 0
extern LPDIRECTDRAW lpDD; extern LPDIRECTDRAW lpDD;
extern qboolean DDActive; extern qboolean DDActive;
extern LPDIRECTDRAWSURFACE lpPrimary; extern LPDIRECTDRAWSURFACE lpPrimary;
@ -76,7 +80,7 @@ extern LPDIRECTDRAWSURFACE lpBackBuffer;
extern LPDIRECTDRAWPALETTE lpDDPal; extern LPDIRECTDRAWPALETTE lpDDPal;
extern LPDIRECTSOUND pDS; extern LPDIRECTSOUND pDS;
extern LPDIRECTSOUNDBUFFER pDSBuf; extern LPDIRECTSOUNDBUFFER pDSBuf;
#endif
extern DWORD gSndBufSize; extern DWORD gSndBufSize;
void VID_LockBuffer (void); void VID_LockBuffer (void);
void VID_UnlockBuffer (void); void VID_UnlockBuffer (void);

View file

@ -134,6 +134,7 @@ I_CDAudio_GetAudioDiskInfo (void)
return 0; return 0;
} }
#if 0
LONG LONG
static I_CDAudio_MessageHandler (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) static I_CDAudio_MessageHandler (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{ {
@ -166,6 +167,7 @@ static I_CDAudio_MessageHandler (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPa
return 0; return 0;
} }
#endif
static void static void
I_CDAudio_Pause (void) I_CDAudio_Pause (void)

View file

@ -570,11 +570,13 @@ SND_ClearBuffer (void)
{ {
int clear; int clear;
#ifdef _WIN32
if (!sound_started || !shm || (!shm->buffer && !pDSBuf)) //#ifdef _WIN32
#else // if (!sound_started || !shm || (!shm->buffer && !pDSBuf))
//#endif
if (!sound_started || !shm || !shm->buffer) if (!sound_started || !shm || !shm->buffer)
#endif //#endif
return; return;
if (shm->samplebits == 8) if (shm->samplebits == 8)
@ -582,10 +584,12 @@ SND_ClearBuffer (void)
else else
clear = 0; clear = 0;
#if 0
#ifdef _WIN32 #ifdef _WIN32
if (pDSBuf) if (pDSBuf)
DSOUND_ClearBuffer (clear); DSOUND_ClearBuffer (clear);
else else
#endif
#endif #endif
{ {
memset (shm->buffer, clear, shm->samples * shm->samplebits / 8); memset (shm->buffer, clear, shm->samples * shm->samplebits / 8);
@ -823,9 +827,11 @@ SND_Update_ (void)
if (endtime - soundtime > samps) if (endtime - soundtime > samps)
endtime = soundtime + samps; endtime = soundtime + samps;
#if 0
#ifdef _WIN32 #ifdef _WIN32
if (pDSBuf) if (pDSBuf)
DSOUND_Restore (); DSOUND_Restore ();
#endif
#endif #endif
SND_PaintChannels (endtime); SND_PaintChannels (endtime);

View file

@ -96,6 +96,8 @@ SND_TransferStereo16 (int endtime)
snd_p = (int *) paintbuffer; snd_p = (int *) paintbuffer;
lpaintedtime = paintedtime; lpaintedtime = paintedtime;
#if 0
#ifdef _WIN32 #ifdef _WIN32
if (pDSBuf) { if (pDSBuf) {
pbuf = DSOUND_LockBuffer (true); pbuf = DSOUND_LockBuffer (true);
@ -104,6 +106,7 @@ SND_TransferStereo16 (int endtime)
return; return;
} }
} else } else
#endif
#endif #endif
{ {
pbuf = (DWORD *) shm->buffer; pbuf = (DWORD *) shm->buffer;
@ -128,10 +131,12 @@ SND_TransferStereo16 (int endtime)
lpaintedtime += (snd_linear_count >> 1); lpaintedtime += (snd_linear_count >> 1);
} }
#if 0
#ifdef _WIN32 #ifdef _WIN32
if (pDSBuf) if (pDSBuf)
DSOUND_LockBuffer (false); DSOUND_LockBuffer (false);
#endif #endif
#endif
} }
void void
@ -153,6 +158,7 @@ SND_TransferPaintBuffer (int endtime)
step = 3 - shm->channels; step = 3 - shm->channels;
snd_vol = volume->value * 256; snd_vol = volume->value * 256;
#if 0
#ifdef _WIN32 #ifdef _WIN32
if (pDSBuf) { if (pDSBuf) {
pbuf = DSOUND_LockBuffer (true); pbuf = DSOUND_LockBuffer (true);
@ -161,6 +167,7 @@ SND_TransferPaintBuffer (int endtime)
return; return;
} }
} else } else
#endif
#endif #endif
{ {
pbuf = (DWORD *) shm->buffer; pbuf = (DWORD *) shm->buffer;
@ -193,10 +200,12 @@ SND_TransferPaintBuffer (int endtime)
out_idx = (out_idx + 1) & out_mask; out_idx = (out_idx + 1) & out_mask;
} }
} }
#if 0
#ifdef _WIN32 #ifdef _WIN32
if (pDSBuf) if (pDSBuf)
DSOUND_LockBuffer (false); DSOUND_LockBuffer (false);
#endif #endif
#endif
} }
/* CHANNEL MIXING */ /* CHANNEL MIXING */