From fce24d4fb363cb027cf8d6cbc13fac6f35ef5559 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 --HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40170 --- 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);