From 7a7781217e83fcb0f0b82f8fe95a47285d9c754d Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Tue, 4 Sep 2001 23:21:20 +0000 Subject: [PATCH] Allow building SDL on Windows without audio support --- src/video/windib/SDL_dibvideo.c | 2 ++ src/video/windx5/SDL_dx5video.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/video/windib/SDL_dibvideo.c b/src/video/windib/SDL_dibvideo.c index 10dccf618..cec7bf309 100644 --- a/src/video/windib/SDL_dibvideo.c +++ b/src/video/windib/SDL_dibvideo.c @@ -286,7 +286,9 @@ int DIB_VideoInit(_THIS, SDL_PixelFormat *vformat) if ( DIB_CreateWindow(this) < 0 ) { return(-1); } +#ifndef DISABLE_AUDIO DX5_SoundFocus(SDL_Window); +#endif /* Determine the screen depth */ vformat->BitsPerPixel = DIB_SussScreenDepth(); diff --git a/src/video/windx5/SDL_dx5video.c b/src/video/windx5/SDL_dx5video.c index 87a6f3ba9..d96d1e7de 100644 --- a/src/video/windx5/SDL_dx5video.c +++ b/src/video/windx5/SDL_dx5video.c @@ -876,7 +876,9 @@ int DX5_VideoInit(_THIS, SDL_PixelFormat *vformat) if ( DX5_CreateWindow(this) < 0 ) { return(-1); } +#ifndef DISABLE_AUDIO DX5_SoundFocus(SDL_Window); +#endif /* Create the DirectDraw object */ result = DDrawCreate(NULL, &ddraw, NULL);