Add NULL drivers.

This commit is contained in:
Themaister 2012-06-20 00:43:41 +02:00
parent e6ba30f722
commit fd017b8f57
6 changed files with 100 additions and 42 deletions

View File

@ -2,8 +2,28 @@ include config.mk
TARGET = retroarch tools/retroarch-joyconfig
OBJ = retroarch.o file.o file_path.o hash.o driver.o settings.o dynamic.o message.o rewind.o gfx/gfx_common.o patch.o compat/compat.o screenshot.o audio/utils.o
JOYCONFIG_OBJ = tools/retroarch-joyconfig.o conf/config_file.o compat/compat.o
OBJ = retroarch.o \
file.o \
file_path.o \
hash.o \
driver.o \
settings.o \
dynamic.o \
message.o \
rewind.o \
gfx/gfx_common.o \
patch.o \
compat/compat.o \
screenshot.o \
audio/utils.o \
audio/null.o \
input/null.o \
gfx/null.o
JOYCONFIG_OBJ := tools/retroarch-joyconfig.o \
conf/config_file.o \
compat/compat.o
HEADERS = $(wildcard */*.h) $(wildcard *.h)
LIBS = -lm

View File

@ -1,7 +1,29 @@
TARGET = retroarch.exe
JTARGET = retroarch-joyconfig.exe
OBJ = retroarch.o file.o file_path.o driver.o conf/config_file.o settings.o hash.o dynamic.o message.o rewind.o movie.o gfx/gfx_common.o patch.o compat/compat.o screenshot.o audio/utils.o
JOBJ = conf/config_file.o tools/retroarch-joyconfig.o compat/compat.o
OBJ = retroarch.o \
file.o \
file_path.o \
driver.o \
conf/config_file.o \
settings.o \
hash.o \
dynamic.o \
message.o \
rewind.o \
movie.o \
gfx/gfx_common.o \
patch.o \
compat/compat.o \
screenshot.o \
audio/utils.o \
audio/null.o \
input/null.o \
gfx/null.o
JOBJ := conf/config_file.o \
tools/retroarch-joyconfig.o \
compat/compat.o
CC = gcc
CXX = g++

View File

@ -30,41 +30,45 @@
#include "input/keysym.h"
///////////////// Drivers
#define VIDEO_GL 0
#define VIDEO_XVIDEO 11
#define VIDEO_SDL 13
#define VIDEO_EXT 14
#define VIDEO_WII 24
#define VIDEO_XENON360 25
#define VIDEO_XDK360 28
#define VIDEO_RPI 29
////////////////////////
#define AUDIO_RSOUND 1
#define AUDIO_OSS 2
#define AUDIO_ALSA 3
#define AUDIO_ROAR 4
#define AUDIO_AL 5
#define AUDIO_JACK 6
#define AUDIO_SDL 8
#define AUDIO_XAUDIO 9
#define AUDIO_PULSE 10
#define AUDIO_EXT 15
#define AUDIO_DSOUND 16
#define AUDIO_COREAUDIO 17
#define AUDIO_PS3 18
#define AUDIO_XENON360 20
#define AUDIO_WII 22
#define AUDIO_XDK360 27
////////////////////////
#define INPUT_SDL 7
#define INPUT_X 12
#define INPUT_PS3 19
#define INPUT_XENON360 21
#define INPUT_WII 23
#define INPUT_XDK360 26
#define INPUT_LINUXRAW 30
////////////////////////
enum
{
VIDEO_GL = 0,
VIDEO_XVIDEO,
VIDEO_SDL,
VIDEO_EXT,
VIDEO_WII,
VIDEO_XENON360,
VIDEO_XDK360,
VIDEO_RPI,
VIDEO_NULL,
AUDIO_RSOUND,
AUDIO_OSS,
AUDIO_ALSA,
AUDIO_ROAR,
AUDIO_AL,
AUDIO_JACK,
AUDIO_SDL,
AUDIO_XAUDIO,
AUDIO_PULSE,
AUDIO_EXT,
AUDIO_DSOUND,
AUDIO_COREAUDIO,
AUDIO_PS3,
AUDIO_XENON360,
AUDIO_WII,
AUDIO_XDK360,
AUDIO_NULL,
INPUT_SDL,
INPUT_X,
INPUT_PS3,
INPUT_XENON360,
INPUT_WII,
INPUT_XDK360,
INPUT_LINUXRAW,
INPUT_NULL
};
#if defined(HAVE_RPI)
#define VIDEO_DEFAULT_DRIVER VIDEO_RPI
@ -83,7 +87,7 @@
#elif defined(HAVE_DYLIB)
#define VIDEO_DEFAULT_DRIVER VIDEO_EXT
#else
#error "Need at least one video driver."
#define VIDEO_DEFAULT_DRIVER VIDEO_NULL
#endif
#if defined(__CELLOS_LV2__)
@ -119,7 +123,7 @@
#elif defined(HAVE_DYLIB)
#define AUDIO_DEFAULT_DRIVER AUDIO_EXT
#else
#error "Need at least one audio driver."
#define AUDIO_DEFAULT_DRIVER AUDIO_NULL
#endif
#if defined(XENON)
@ -135,7 +139,7 @@
#elif defined(HAVE_XVIDEO)
#define INPUT_DEFAULT_DRIVER INPUT_X
#else
#error "Need at least one input driver."
#define INPUT_DEFAULT_DRIVER INPUT_NULL
#endif

View File

@ -75,6 +75,7 @@ static const audio_driver_t *audio_drivers[] = {
#ifdef GEKKO
&audio_wii,
#endif
&audio_null,
};
static const video_driver_t *video_drivers[] = {
@ -102,6 +103,7 @@ static const video_driver_t *video_drivers[] = {
#ifdef HAVE_RPI
&video_rpi,
#endif
&video_null,
};
static const input_driver_t *input_drivers[] = {
@ -126,6 +128,7 @@ static const input_driver_t *input_drivers[] = {
#ifdef IS_LINUX
&input_linuxraw,
#endif
&input_null,
};
static void find_audio_driver(void)

View File

@ -214,6 +214,7 @@ extern const audio_driver_t audio_xenon360;
extern const audio_driver_t audio_xdk360;
extern const audio_driver_t audio_ps3;
extern const audio_driver_t audio_wii;
extern const audio_driver_t audio_null;
extern const video_driver_t video_gl;
extern const video_driver_t video_wii;
extern const video_driver_t video_xenon360;
@ -222,6 +223,7 @@ extern const video_driver_t video_xdk360;
extern const video_driver_t video_sdl;
extern const video_driver_t video_rpi;
extern const video_driver_t video_ext;
extern const video_driver_t video_null;
extern const input_driver_t input_sdl;
extern const input_driver_t input_x;
extern const input_driver_t input_ps3;
@ -229,6 +231,7 @@ extern const input_driver_t input_xenon360;
extern const input_driver_t input_wii;
extern const input_driver_t input_xdk360;
extern const input_driver_t input_linuxraw;
extern const input_driver_t input_null;
////////////////////////////////////////////////
// Convenience macros.

View File

@ -68,6 +68,8 @@ const char *config_get_default_audio(void)
return "ps3";
case AUDIO_WII:
return "wii";
case AUDIO_NULL:
return "null";
default:
return NULL;
}
@ -93,6 +95,8 @@ const char *config_get_default_video(void)
return "ext";
case VIDEO_RPI:
return "rpi";
case VIDEO_NULL:
return "null";
default:
return NULL;
}
@ -116,6 +120,8 @@ const char *config_get_default_input(void)
return "wii";
case INPUT_LINUXRAW:
return "linuxraw";
case INPUT_NULL:
return "null";
default:
return NULL;
}