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

View file

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

View file

@ -134,6 +134,7 @@ I_CDAudio_GetAudioDiskInfo (void)
return 0;
}
#if 0
LONG
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;
}
#endif
static void
I_CDAudio_Pause (void)

View file

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

View file

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