Add dummy cdrom ioctl module for other OSes

This commit is contained in:
Greg V 2018-05-18 02:51:33 +03:00
commit f002abe258
3 changed files with 36 additions and 1 deletions

View file

@ -118,6 +118,7 @@ AC_CHECK_LIB([pthread], [pthread_create])
build_macosx="no"
build_linux="no"
build_win="no"
build_other="no"
case "$host" in
*-*-darwin*)
@ -135,7 +136,7 @@ case "$host" in
build_win="yes"
AC_SUBST(SET_MAKE, 'MAKE=mingw32-make')
;;
*)
*-*-linux*)
AC_CHECK_LIB([GL], [glGetError], [], \
[echo "You need to install the OpenGL library."
exit -1])
@ -144,12 +145,22 @@ case "$host" in
exit -1])
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
LIBS="$LIBS $WX_LIBS $SDL_LIBS"
AM_CONDITIONAL(OS_LINUX, [test "$build_linux" = "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"])
AC_OUTPUT([Makefile src/Makefile])

View file

@ -97,6 +97,10 @@ if OS_LINUX
pcem_SOURCES += cdrom-ioctl-linux.c wx-sdl2-display.c
endif
if OS_OTHER
pcem_SOURCES += cdrom-ioctl-dummy.c wx-sdl2-display.c
endif
if OS_MACOSX
pcem_SOURCES += cdrom-ioctl-osx.c wx-sdl2-display.c
pcem_CFLAGS += -DPCEM_RENDER_WITH_TIMER -DPCEM_RENDER_TIMER_LOOP

20
src/cdrom-ioctl-dummy.c Normal file
View 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) { }