diff --git a/configure.ac b/configure.ac index 17785c80c..b886390ee 100644 --- a/configure.ac +++ b/configure.ac @@ -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 diff --git a/include/winquake.h b/include/winquake.h index e3bc4d067..fff0bb22d 100644 --- a/include/winquake.h +++ b/include/winquake.h @@ -43,14 +43,18 @@ #undef LPCWAVEFORMATEX #ifdef WINNT #undef WINNT +#if 0 #include #include +#endif #define WINNT #else #include +#if 0 #include #include #endif +#endif #ifdef HAVE_MGRAPH_H # include @@ -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); diff --git a/libs/audio/cd/cd_win.c b/libs/audio/cd/cd_win.c index 96c1516ef..974a4b2cb 100644 --- a/libs/audio/cd/cd_win.c +++ b/libs/audio/cd/cd_win.c @@ -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) diff --git a/libs/audio/renderer/snd_dma.c b/libs/audio/renderer/snd_dma.c index 15bfff05b..0fe6f7212 100644 --- a/libs/audio/renderer/snd_dma.c +++ b/libs/audio/renderer/snd_dma.c @@ -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); diff --git a/libs/audio/renderer/snd_mix.c b/libs/audio/renderer/snd_mix.c index 7a26ecc27..62559d7ff 100644 --- a/libs/audio/renderer/snd_mix.c +++ b/libs/audio/renderer/snd_mix.c @@ -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 */