Add dummy cdrom ioctl module for other OSes
This commit is contained in:
parent
d5b7a69ff6
commit
f002abe258
3 changed files with 36 additions and 1 deletions
13
configure.ac
13
configure.ac
|
|
@ -118,6 +118,7 @@ AC_CHECK_LIB([pthread], [pthread_create])
|
||||||
build_macosx="no"
|
build_macosx="no"
|
||||||
build_linux="no"
|
build_linux="no"
|
||||||
build_win="no"
|
build_win="no"
|
||||||
|
build_other="no"
|
||||||
|
|
||||||
case "$host" in
|
case "$host" in
|
||||||
*-*-darwin*)
|
*-*-darwin*)
|
||||||
|
|
@ -135,7 +136,7 @@ case "$host" in
|
||||||
build_win="yes"
|
build_win="yes"
|
||||||
AC_SUBST(SET_MAKE, 'MAKE=mingw32-make')
|
AC_SUBST(SET_MAKE, 'MAKE=mingw32-make')
|
||||||
;;
|
;;
|
||||||
*)
|
*-*-linux*)
|
||||||
AC_CHECK_LIB([GL], [glGetError], [], \
|
AC_CHECK_LIB([GL], [glGetError], [], \
|
||||||
[echo "You need to install the OpenGL library."
|
[echo "You need to install the OpenGL library."
|
||||||
exit -1])
|
exit -1])
|
||||||
|
|
@ -144,12 +145,22 @@ case "$host" in
|
||||||
exit -1])
|
exit -1])
|
||||||
build_linux="yes"
|
build_linux="yes"
|
||||||
;;
|
;;
|
||||||
|
*)
|
||||||
|
AC_CHECK_LIB([GL], [glGetError], [], \
|
||||||
|
[echo "You need to install the OpenGL library."
|
||||||
|
exit -1])
|
||||||
|
AC_CHECK_LIB([openal], [alGetError], [], \
|
||||||
|
[echo "You need to install the OpenAL library."
|
||||||
|
exit -1])
|
||||||
|
build_other="yes"
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
LIBS="$LIBS $WX_LIBS $SDL_LIBS"
|
LIBS="$LIBS $WX_LIBS $SDL_LIBS"
|
||||||
|
|
||||||
AM_CONDITIONAL(OS_LINUX, [test "$build_linux" = "yes"])
|
AM_CONDITIONAL(OS_LINUX, [test "$build_linux" = "yes"])
|
||||||
AM_CONDITIONAL(OS_WINDOWS, [test "$build_win" = "yes"])
|
AM_CONDITIONAL(OS_WINDOWS, [test "$build_win" = "yes"])
|
||||||
|
AM_CONDITIONAL(OS_OTHER, [test "$build_other" = "yes"])
|
||||||
AM_CONDITIONAL(OS_MACOSX, [test "$build_macosx" = "yes"])
|
AM_CONDITIONAL(OS_MACOSX, [test "$build_macosx" = "yes"])
|
||||||
|
|
||||||
AC_OUTPUT([Makefile src/Makefile])
|
AC_OUTPUT([Makefile src/Makefile])
|
||||||
|
|
|
||||||
|
|
@ -97,6 +97,10 @@ if OS_LINUX
|
||||||
pcem_SOURCES += cdrom-ioctl-linux.c wx-sdl2-display.c
|
pcem_SOURCES += cdrom-ioctl-linux.c wx-sdl2-display.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if OS_OTHER
|
||||||
|
pcem_SOURCES += cdrom-ioctl-dummy.c wx-sdl2-display.c
|
||||||
|
endif
|
||||||
|
|
||||||
if OS_MACOSX
|
if OS_MACOSX
|
||||||
pcem_SOURCES += cdrom-ioctl-osx.c wx-sdl2-display.c
|
pcem_SOURCES += cdrom-ioctl-osx.c wx-sdl2-display.c
|
||||||
pcem_CFLAGS += -DPCEM_RENDER_WITH_TIMER -DPCEM_RENDER_TIMER_LOOP
|
pcem_CFLAGS += -DPCEM_RENDER_WITH_TIMER -DPCEM_RENDER_TIMER_LOOP
|
||||||
|
|
|
||||||
20
src/cdrom-ioctl-dummy.c
Normal file
20
src/cdrom-ioctl-dummy.c
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
/*Dummy CD-ROM support for other OSes*/
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
int old_cdrom_drive;
|
||||||
|
|
||||||
|
void ioctl_audio_callback(int16_t *output, int len) { }
|
||||||
|
|
||||||
|
void ioctl_audio_stop() { }
|
||||||
|
|
||||||
|
void ioctl_reset() { }
|
||||||
|
|
||||||
|
void ioctl_set_drive(char d) { }
|
||||||
|
|
||||||
|
int ioctl_open(char d)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ioctl_close(void) { }
|
||||||
Loading…
Reference in a new issue