Dummy audio and video drivers are enabled (thanks Ryan!)
--HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%4087
This commit is contained in:
parent
32bf9a536b
commit
b28f12dc1c
3 changed files with 32 additions and 20 deletions
10
configure.in
10
configure.in
|
@ -368,13 +368,12 @@ CheckNAS()
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
dnl rcg07142001 See if the user wants the disk writer audio driver...
|
dnl rcg07142001 See if the user wants the disk writer audio driver...
|
||||||
CheckDiskAudio()
|
CheckDiskAudio()
|
||||||
{
|
{
|
||||||
AC_ARG_ENABLE(diskaudio,
|
AC_ARG_ENABLE(diskaudio,
|
||||||
[ --enable-diskaudio support the disk writer audio driver [default=no]],
|
[ --enable-diskaudio support the disk writer audio driver [default=yes]],
|
||||||
, enable_diskaudio=no)
|
, enable_diskaudio=yes)
|
||||||
if test x$enable_audio = xyes -a x$enable_diskaudio = xyes; then
|
if test x$enable_audio = xyes -a x$enable_diskaudio = xyes; then
|
||||||
CFLAGS="$CFLAGS -DDISKAUD_SUPPORT"
|
CFLAGS="$CFLAGS -DDISKAUD_SUPPORT"
|
||||||
AUDIO_SUBDIRS="$AUDIO_SUBDIRS disk"
|
AUDIO_SUBDIRS="$AUDIO_SUBDIRS disk"
|
||||||
|
@ -382,7 +381,6 @@ CheckDiskAudio()
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
dnl See if we can use x86 assembly blitters
|
dnl See if we can use x86 assembly blitters
|
||||||
CheckNASM()
|
CheckNASM()
|
||||||
{
|
{
|
||||||
|
@ -810,8 +808,8 @@ dnl rcg04172001 Set up the Null video driver.
|
||||||
CheckDummyVideo()
|
CheckDummyVideo()
|
||||||
{
|
{
|
||||||
AC_ARG_ENABLE(video-dummy,
|
AC_ARG_ENABLE(video-dummy,
|
||||||
[ --enable-video-dummy use dummy video driver [default=no]],
|
[ --enable-video-dummy use dummy video driver [default=yes]],
|
||||||
, enable_video_dummy=no)
|
, enable_video_dummy=yes)
|
||||||
if test x$enable_video_dummy = xyes; then
|
if test x$enable_video_dummy = xyes; then
|
||||||
CFLAGS="$CFLAGS -DENABLE_DUMMYVIDEO"
|
CFLAGS="$CFLAGS -DENABLE_DUMMYVIDEO"
|
||||||
VIDEO_SUBDIRS="$VIDEO_SUBDIRS dummy"
|
VIDEO_SUBDIRS="$VIDEO_SUBDIRS dummy"
|
||||||
|
|
|
@ -80,9 +80,10 @@ static int DISKAUD_Available(void)
|
||||||
int exists = 0;
|
int exists = 0;
|
||||||
struct stat statbuf;
|
struct stat statbuf;
|
||||||
const char *fname = DISKAUD_GetOutputFilename();
|
const char *fname = DISKAUD_GetOutputFilename();
|
||||||
|
const char *envr = getenv("SDL_AUDIODRIVER");
|
||||||
available = 0;
|
available = 0;
|
||||||
|
|
||||||
|
if ((envr) && (strcmp(envr, DISKAUD_DRIVER_NAME) == 0)) {
|
||||||
if (stat(fname, &statbuf) == 0)
|
if (stat(fname, &statbuf) == 0)
|
||||||
exists = 1;
|
exists = 1;
|
||||||
|
|
||||||
|
@ -94,9 +95,15 @@ static int DISKAUD_Available(void)
|
||||||
unlink(fname);
|
unlink(fname);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return(available);
|
return(available);
|
||||||
#else
|
#else
|
||||||
|
const char *envr = getenv("SDL_AUDIODRIVER");
|
||||||
|
if ((envr) && (strcmp(envr, DISKAUD_DRIVER_NAME) == 0)) {
|
||||||
return(1);
|
return(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
return(0);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -55,6 +55,8 @@ static char rcsid =
|
||||||
#include "SDL_nullevents_c.h"
|
#include "SDL_nullevents_c.h"
|
||||||
#include "SDL_nullmouse_c.h"
|
#include "SDL_nullmouse_c.h"
|
||||||
|
|
||||||
|
#define DUMMYVID_DRIVER_NAME "dummy"
|
||||||
|
|
||||||
/* Initialization/Query functions */
|
/* Initialization/Query functions */
|
||||||
static int DUMMY_VideoInit(_THIS, SDL_PixelFormat *vformat);
|
static int DUMMY_VideoInit(_THIS, SDL_PixelFormat *vformat);
|
||||||
static SDL_Rect **DUMMY_ListModes(_THIS, SDL_PixelFormat *format, Uint32 flags);
|
static SDL_Rect **DUMMY_ListModes(_THIS, SDL_PixelFormat *format, Uint32 flags);
|
||||||
|
@ -76,7 +78,12 @@ static void DUMMY_UpdateRects(_THIS, int numrects, SDL_Rect *rects);
|
||||||
|
|
||||||
static int DUMMY_Available(void)
|
static int DUMMY_Available(void)
|
||||||
{
|
{
|
||||||
return 1; /* Always available ! */
|
const char *envr = getenv("SDL_VIDEODRIVER");
|
||||||
|
if ((envr) && (strcmp(envr, DUMMYVID_DRIVER_NAME) == 0)) {
|
||||||
|
return(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
return(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void DUMMY_DeleteDevice(SDL_VideoDevice *device)
|
static void DUMMY_DeleteDevice(SDL_VideoDevice *device)
|
||||||
|
@ -136,7 +143,7 @@ static SDL_VideoDevice *DUMMY_CreateDevice(int devindex)
|
||||||
}
|
}
|
||||||
|
|
||||||
VideoBootStrap DUMMY_bootstrap = {
|
VideoBootStrap DUMMY_bootstrap = {
|
||||||
"dummy", "SDL dummy video driver",
|
DUMMYVID_DRIVER_NAME, "SDL dummy video driver",
|
||||||
DUMMY_Available, DUMMY_CreateDevice
|
DUMMY_Available, DUMMY_CreateDevice
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue