merged with repo

main
Apoorv Upreti 2013-11-14 22:35:28 +05:30
commit f9f064d533
46 changed files with 224 additions and 167 deletions

View File

@ -95,8 +95,10 @@ elseif(APPLE)
set(MACOSX TRUE)
endif()
# TODO: iOS?
elseif(CMAKE_SYSTEM_NAME MATCHES "Haiku.*|BeOS.*")
set(BEOS TRUE)
elseif(CMAKE_SYSTEM_NAME MATCHES "BeOS.*")
message_error("BeOS support has been removed as of SDL 2.0.2.")
elseif(CMAKE_SYSTEM_NAME MATCHES "Haiku.*")
set(HAIKU TRUE)
endif()
# Don't mistake osx for unix
@ -308,9 +310,9 @@ if(USE_GCC)
check_c_compiler_flag(-Wall HAVE_GCC_WALL)
if(HAVE_GCC_WALL)
if(CMAKE_SYSTEM_NAME MATCHES "Haiku|BeOS")
if(HAIKU)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-multichar")
endif(CMAKE_SYSTEM_NAME MATCHES "Haiku|BeOS")
endif(HAIKU)
endif(HAVE_GCC_WALL)
endif(USE_GCC)
@ -991,15 +993,15 @@ elseif(APPLE)
endif(SDL_VIDEO)
CheckPTHREAD()
elseif(BEOS)
elseif(HAIKU)
if(SDL_VIDEO)
set(SDL_VIDEO_DRIVER_BWINDOW 1)
file(GLOB BWINDOW_SOURCES ${SDL2_SOURCE_DIR}/src/video/bwindow/*.c)
set(SOURCE_FILES ${SOURCE_FILES} ${BWINDOW_SOURCES})
set(SDL_VIDEO_DRIVER_HAIKU 1)
file(GLOB HAIKUVIDEO_SOURCES ${SDL2_SOURCE_DIR}/src/video/haiku/*.c)
set(SOURCE_FILES ${SOURCE_FILES} ${HAIKUVIDEO_SOURCES})
set(HAVE_SDL_VIDEO TRUE)
set(SDL_FILESYSTEM_BEOS 1)
file(GLOB FILESYSTEM_SOURCES ${SDL2_SOURCE_DIR}/src/filesystem/beos/*.cc)
set(SDL_FILESYSTEM_HAIKU 1)
file(GLOB FILESYSTEM_SOURCES ${SDL2_SOURCE_DIR}/src/filesystem/haiku/*.cc)
set(SOURCE_FILES ${SOURCE_FILES} ${FILESYSTEM_SOURCES})
set(HAVE_SDL_FILESYSTEM TRUE)

View File

@ -30,3 +30,51 @@ NOTES:
configure script to include DirectFB support. Send patches. :)
================================================================================
Joystick does not work
================================================================================
If you compiled or are using a version of SDL with udev support (and you should!)
there's a few issues that may cause SDL to fail to detect your joystick. To
debug this, start by installing the evtest utility. On Ubuntu/Debian:
sudo apt-get install evtest
Then run:
sudo evtest
You'll hopefully see your joystick listed along with a name like "/dev/input/eventXX"
Now run:
cat /dev/input/event/XX
If you get a permission error, you need to set a udev rule to change the mode of
your device (see below)
Also, try:
sudo udevadm info --query=all --name=input/eventXX
If you see a line stating ID_INPUT_JOYSTICK=1, great, if you don't see it,
you need to set up an udev rule to force this variable.
A combined rule for the Saitek Pro Flight Rudder Pedals to fix both issues looks
like:
SUBSYSTEM=="input", ATTRS{idProduct}=="0763", ATTRS{idVendor}=="06a3", MODE="0666", ENV{ID_INPUT_JOYSTICK}="1"
SUBSYSTEM=="input", ATTRS{idProduct}=="0764", ATTRS{idVendor}=="06a3", MODE="0666", ENV{ID_INPUT_JOYSTICK}="1"
You can set up similar rules for your device by changing the values listed in
idProduct and idVendor. To obtain these values, try:
sudo udevadm info -a --name=input/eventXX | grep idVendor
sudo udevadm info -a --name=input/eventXX | grep idProduct
If multiple values come up for each of these, the one you want is the first one of each.
On other systems which ship with an older udev (such as CentOS), you may need
to set up a rule such as:
SUBSYSTEM=="input", ENV{ID_CLASS}=="joystick", ENV{ID_INPUT_JOYSTICK}="1"

View File

@ -638,7 +638,7 @@ macro(CheckPTHREAD)
elseif(HPUX)
set(PTHREAD_CFLAGS "-D_REENTRANT")
set(PTHREAD_LDFLAGS "-L/usr/lib -pthread")
elseif(BEOS)
elseif(HAIKU)
set(PTHREAD_CFLAGS "-D_REENTRANT")
set(PTHREAD_LDFLAGS "")
else()

52
configure vendored
View File

@ -15950,7 +15950,7 @@ $as_echo "$have_gcc_mmd_mt" >&6; }
fi
fi
# Actually this doesn't work on OpenBSD and BeOS
# Actually this doesn't work on OpenBSD
#AC_MSG_CHECKING(for linker option --no-undefined)
#have_no_undefined=no
#save_LDFLAGS="$LDFLAGS"
@ -18598,7 +18598,7 @@ $as_echo "$have_gcc_Wall" >&6; }
$as_echo_n "checking for necessary GCC -Wno-multichar option... " >&6; }
need_gcc_Wno_multichar=no
case "$host" in
*-*-beos* | *-*-haiku*)
*-*-haiku*)
need_gcc_Wno_multichar=yes
;;
esac
@ -20124,13 +20124,13 @@ $as_echo "#define SDL_VIDEO_DRIVER_X11_XVIDMODE 1" >>confdefs.h
fi
}
CheckBWINDOW()
CheckHaikuVideo()
{
if test x$enable_video = xyes; then
$as_echo "#define SDL_VIDEO_DRIVER_BWINDOW 1" >>confdefs.h
$as_echo "#define SDL_VIDEO_DRIVER_HAIKU 1" >>confdefs.h
SOURCES="$SOURCES $srcdir/src/video/bwindow/*.cc"
SOURCES="$SOURCES $srcdir/src/video/haiku/*.cc"
have_video=yes
fi
}
@ -20680,14 +20680,14 @@ $as_echo "#define SDL_VIDEO_RENDER_OGL 1" >>confdefs.h
fi
}
CheckBeGL()
CheckHaikuGL()
{
if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then
$as_echo "#define SDL_VIDEO_OPENGL 1" >>confdefs.h
$as_echo "#define SDL_VIDEO_OPENGL_BGL 1" >>confdefs.h
$as_echo "#define SDL_VIDEO_OPENGL_HAIKU 1" >>confdefs.h
$as_echo "#define SDL_VIDEO_RENDER_OGL 1" >>confdefs.h
@ -22399,66 +22399,72 @@ fi
fi
;;
*-*-beos*)
as_fn_error $? "
*** BeOS support has been removed as of SDL 2.0.2.
" "$LINENO" 5
;;
*-*-haiku*)
ARCH=beos
ARCH=haiku
ac_default_prefix=/boot/common
CheckDummyVideo
CheckDiskAudio
CheckDummyAudio
CheckBWINDOW
CheckBeGL
CheckHaikuVideo
CheckHaikuGL
CheckPTHREAD
# Set up files for the audio library
if test x$enable_audio = xyes; then
$as_echo "#define SDL_AUDIO_DRIVER_BEOSAUDIO 1" >>confdefs.h
$as_echo "#define SDL_AUDIO_DRIVER_HAIKU 1" >>confdefs.h
SOURCES="$SOURCES $srcdir/src/audio/baudio/*.cc"
SOURCES="$SOURCES $srcdir/src/audio/haiku/*.cc"
have_audio=yes
fi
# Set up files for the joystick library
if test x$enable_joystick = xyes; then
$as_echo "#define SDL_JOYSTICK_BEOS 1" >>confdefs.h
$as_echo "#define SDL_JOYSTICK_HAIKU 1" >>confdefs.h
SOURCES="$SOURCES $srcdir/src/joystick/beos/*.cc"
SOURCES="$SOURCES $srcdir/src/joystick/haiku/*.cc"
have_joystick=yes
fi
# Set up files for the timer library
if test x$enable_timers = xyes; then
$as_echo "#define SDL_TIMER_BEOS 1" >>confdefs.h
$as_echo "#define SDL_TIMER_HAIKU 1" >>confdefs.h
SOURCES="$SOURCES $srcdir/src/timer/beos/*.c"
SOURCES="$SOURCES $srcdir/src/timer/haiku/*.c"
have_timers=yes
fi
# Set up files for the shared object loading library
if test x$enable_loadso = xyes; then
$as_echo "#define SDL_LOADSO_BEOS 1" >>confdefs.h
$as_echo "#define SDL_LOADSO_HAIKU 1" >>confdefs.h
SOURCES="$SOURCES $srcdir/src/loadso/beos/*.c"
SOURCES="$SOURCES $srcdir/src/loadso/haiku/*.c"
have_loadso=yes
fi
# Set up files for the system power library
if test x$enable_power = xyes; then
$as_echo "#define SDL_POWER_BEOS 1" >>confdefs.h
$as_echo "#define SDL_POWER_HAIKU 1" >>confdefs.h
SOURCES="$SOURCES $srcdir/src/power/beos/*.c"
SOURCES="$SOURCES $srcdir/src/power/haiku/*.c"
have_power=yes
fi
# Set up files for the system filesystem library
if test x$enable_filesystem = xyes; then
$as_echo "#define SDL_FILESYSTEM_BEOS 1" >>confdefs.h
$as_echo "#define SDL_FILESYSTEM_HAIKU 1" >>confdefs.h
SOURCES="$SOURCES $srcdir/src/filesystem/beos/*.cc"
SOURCES="$SOURCES $srcdir/src/filesystem/haiku/*.cc"
have_filesystem=yes
fi
# The BeOS platform requires special setup.
SOURCES="$srcdir/src/main/beos/*.cc $SOURCES"
SOURCES="$srcdir/src/main/haiku/*.cc $SOURCES"
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lroot -lbe -lmedia -lgame -ldevice -ltextencoding"
;;
arm*-apple-darwin*)

View File

@ -204,7 +204,7 @@ if test x$enable_dependency_tracking = xyes; then
fi
fi
# Actually this doesn't work on OpenBSD and BeOS
# Actually this doesn't work on OpenBSD
#AC_MSG_CHECKING(for linker option --no-undefined)
#have_no_undefined=no
#save_LDFLAGS="$LDFLAGS"
@ -1097,7 +1097,7 @@ CheckWarnAll()
AC_MSG_CHECKING(for necessary GCC -Wno-multichar option)
need_gcc_Wno_multichar=no
case "$host" in
*-*-beos* | *-*-haiku*)
*-*-haiku*)
need_gcc_Wno_multichar=yes
;;
esac
@ -1474,12 +1474,12 @@ AC_HELP_STRING([--enable-video-x11-vm], [use X11 VM extension for fullscreen [[d
fi
}
dnl Set up the BWindow video driver if enabled
CheckBWINDOW()
dnl Set up the Haiku video driver if enabled
CheckHaikuVideo()
{
if test x$enable_video = xyes; then
AC_DEFINE(SDL_VIDEO_DRIVER_BWINDOW, 1, [ ])
SOURCES="$SOURCES $srcdir/src/video/bwindow/*.cc"
AC_DEFINE(SDL_VIDEO_DRIVER_HAIKU, 1, [ ])
SOURCES="$SOURCES $srcdir/src/video/haiku/*.cc"
have_video=yes
fi
}
@ -1743,12 +1743,12 @@ CheckWINDOWSGL()
fi
}
dnl Check for BeOS OpenGL
CheckBeGL()
dnl Check for Haiku OpenGL
CheckHaikuGL()
{
if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then
AC_DEFINE(SDL_VIDEO_OPENGL, 1, [ ])
AC_DEFINE(SDL_VIDEO_OPENGL_BGL, 1, [ ])
AC_DEFINE(SDL_VIDEO_OPENGL_HAIKU, 1, [ ])
AC_DEFINE(SDL_VIDEO_RENDER_OGL, 1, [ ])
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lGL"
fi
@ -2619,55 +2619,60 @@ AC_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[defau
;;
dnl BeOS support removed after SDL 2.0.1. Haiku still works. --ryan.
dnl *-*-beos*)
*-*-beos*)
AC_MSG_ERROR([
*** BeOS support has been removed as of SDL 2.0.2.
])
;;
*-*-haiku*)
ARCH=beos
ARCH=haiku
ac_default_prefix=/boot/common
CheckDummyVideo
CheckDiskAudio
CheckDummyAudio
CheckBWINDOW
CheckBeGL
CheckHaikuVideo
CheckHaikuGL
CheckPTHREAD
# Set up files for the audio library
if test x$enable_audio = xyes; then
AC_DEFINE(SDL_AUDIO_DRIVER_BEOSAUDIO, 1, [ ])
SOURCES="$SOURCES $srcdir/src/audio/baudio/*.cc"
AC_DEFINE(SDL_AUDIO_DRIVER_HAIKU, 1, [ ])
SOURCES="$SOURCES $srcdir/src/audio/haiku/*.cc"
have_audio=yes
fi
# Set up files for the joystick library
if test x$enable_joystick = xyes; then
AC_DEFINE(SDL_JOYSTICK_BEOS, 1, [ ])
SOURCES="$SOURCES $srcdir/src/joystick/beos/*.cc"
AC_DEFINE(SDL_JOYSTICK_HAIKU, 1, [ ])
SOURCES="$SOURCES $srcdir/src/joystick/haiku/*.cc"
have_joystick=yes
fi
# Set up files for the timer library
if test x$enable_timers = xyes; then
AC_DEFINE(SDL_TIMER_BEOS, 1, [ ])
SOURCES="$SOURCES $srcdir/src/timer/beos/*.c"
AC_DEFINE(SDL_TIMER_HAIKU, 1, [ ])
SOURCES="$SOURCES $srcdir/src/timer/haiku/*.c"
have_timers=yes
fi
# Set up files for the shared object loading library
if test x$enable_loadso = xyes; then
AC_DEFINE(SDL_LOADSO_BEOS, 1, [ ])
SOURCES="$SOURCES $srcdir/src/loadso/beos/*.c"
AC_DEFINE(SDL_LOADSO_HAIKU, 1, [ ])
SOURCES="$SOURCES $srcdir/src/loadso/haiku/*.c"
have_loadso=yes
fi
# Set up files for the system power library
if test x$enable_power = xyes; then
AC_DEFINE(SDL_POWER_BEOS, 1, [ ])
SOURCES="$SOURCES $srcdir/src/power/beos/*.c"
AC_DEFINE(SDL_POWER_HAIKU, 1, [ ])
SOURCES="$SOURCES $srcdir/src/power/haiku/*.c"
have_power=yes
fi
# Set up files for the system filesystem library
if test x$enable_filesystem = xyes; then
AC_DEFINE(SDL_FILESYSTEM_BEOS, 1, [ ])
SOURCES="$SOURCES $srcdir/src/filesystem/beos/*.cc"
AC_DEFINE(SDL_FILESYSTEM_HAIKU, 1, [ ])
SOURCES="$SOURCES $srcdir/src/filesystem/haiku/*.cc"
have_filesystem=yes
fi
# The BeOS platform requires special setup.
SOURCES="$srcdir/src/main/beos/*.cc $SOURCES"
# The Haiku platform requires special setup.
SOURCES="$srcdir/src/main/haiku/*.cc $SOURCES"
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lroot -lbe -lmedia -lgame -ldevice -ltextencoding"
;;
arm*-apple-darwin*)

View File

@ -191,7 +191,7 @@
#cmakedefine SDL_AUDIO_DRIVER_ARTS_DYNAMIC @SDL_AUDIO_DRIVER_ARTS_DYNAMIC@
#cmakedefine SDL_AUDIO_DRIVER_PULSEAUDIO @SDL_AUDIO_DRIVER_PULSEAUDIO@
#cmakedefine SDL_AUDIO_DRIVER_PULSEAUDIO_DYNAMIC @SDL_AUDIO_DRIVER_PULSEAUDIO_DYNAMIC@
#cmakedefine SDL_AUDIO_DRIVER_BEOSAUDIO @SDL_AUDIO_DRIVER_BEOSAUDIO@
#cmakedefine SDL_AUDIO_DRIVER_HAIKU @SDL_AUDIO_DRIVER_HAIKU@
#cmakedefine SDL_AUDIO_DRIVER_BSD @SDL_AUDIO_DRIVER_BSD@
#cmakedefine SDL_AUDIO_DRIVER_COREAUDIO @SDL_AUDIO_DRIVER_COREAUDIO@
#cmakedefine SDL_AUDIO_DRIVER_DISK @SDL_AUDIO_DRIVER_DISK@
@ -216,7 +216,7 @@
/* Enable various input drivers */
#cmakedefine SDL_INPUT_LINUXEV @SDL_INPUT_LINUXEV@
#cmakedefine SDL_INPUT_TSLIB @SDL_INPUT_TSLIB@
#cmakedefine SDL_JOYSTICK_BEOS @SDL_JOYSTICK_BEOS@
#cmakedefine SDL_JOYSTICK_HAIKU @SDL_JOYSTICK_HAIKU@
#cmakedefine SDL_JOYSTICK_DINPUT @SDL_JOYSTICK_DINPUT@
#cmakedefine SDL_JOYSTICK_DUMMY @SDL_JOYSTICK_DUMMY@
#cmakedefine SDL_JOYSTICK_IOKIT @SDL_JOYSTICK_IOKIT@
@ -230,7 +230,7 @@
#cmakedefine SDL_HAPTIC_DINPUT @SDL_HAPTIC_DINPUT@
/* Enable various shared object loading systems */
#cmakedefine SDL_LOADSO_BEOS @SDL_LOADSO_BEOS@
#cmakedefine SDL_LOADSO_HAIKU @SDL_LOADSO_HAIKU@
#cmakedefine SDL_LOADSO_DLOPEN @SDL_LOADSO_DLOPEN@
#cmakedefine SDL_LOADSO_DUMMY @SDL_LOADSO_DUMMY@
#cmakedefine SDL_LOADSO_LDG @SDL_LOADSO_LDG@
@ -243,14 +243,14 @@
#cmakedefine SDL_THREAD_WINDOWS @SDL_THREAD_WINDOWS@
/* Enable various timer systems */
#cmakedefine SDL_TIMER_BEOS @SDL_TIMER_BEOS@
#cmakedefine SDL_TIMER_HAIKU @SDL_TIMER_HAIKU@
#cmakedefine SDL_TIMER_DUMMY @SDL_TIMER_DUMMY@
#cmakedefine SDL_TIMER_UNIX @SDL_TIMER_UNIX@
#cmakedefine SDL_TIMER_WINDOWS @SDL_TIMER_WINDOWS@
#cmakedefine SDL_TIMER_WINCE @SDL_TIMER_WINCE@
/* Enable various video drivers */
#cmakedefine SDL_VIDEO_DRIVER_BWINDOW @SDL_VIDEO_DRIVER_BWINDOW@
#cmakedefine SDL_VIDEO_DRIVER_HAIKU @SDL_VIDEO_DRIVER_HAIKU@
#cmakedefine SDL_VIDEO_DRIVER_COCOA @SDL_VIDEO_DRIVER_COCOA@
#cmakedefine SDL_VIDEO_DRIVER_DIRECTFB @SDL_VIDEO_DRIVER_DIRECTFB@
#cmakedefine SDL_VIDEO_DRIVER_DIRECTFB_DYNAMIC @SDL_VIDEO_DRIVER_DIRECTFB_DYNAMIC@
@ -300,11 +300,11 @@
#cmakedefine SDL_POWER_LINUX @SDL_POWER_LINUX@
#cmakedefine SDL_POWER_WINDOWS @SDL_POWER_WINDOWS@
#cmakedefine SDL_POWER_MACOSX @SDL_POWER_MACOSX@
#cmakedefine SDL_POWER_BEOS @SDL_POWER_BEOS@
#cmakedefine SDL_POWER_HAIKU @SDL_POWER_HAIKU@
#cmakedefine SDL_POWER_HARDWIRED @SDL_POWER_HARDWIRED@
/* Enable system filesystem support */
#cmakedefine SDL_FILESYSTEM_BEOS @SDL_FILESYSTEM_BEOS@
#cmakedefine SDL_FILESYSTEM_HAIKU @SDL_FILESYSTEM_HAIKU@
#cmakedefine SDL_FILESYSTEM_COCOA @SDL_FILESYSTEM_COCOA@
#cmakedefine SDL_FILESYSTEM_DUMMY @SDL_FILESYSTEM_DUMMY@
#cmakedefine SDL_FILESYSTEM_UNIX @SDL_FILESYSTEM_UNIX@

View File

@ -193,7 +193,7 @@
#undef SDL_AUDIO_DRIVER_ARTS_DYNAMIC
#undef SDL_AUDIO_DRIVER_PULSEAUDIO
#undef SDL_AUDIO_DRIVER_PULSEAUDIO_DYNAMIC
#undef SDL_AUDIO_DRIVER_BEOSAUDIO
#undef SDL_AUDIO_DRIVER_HAIKU
#undef SDL_AUDIO_DRIVER_BSD
#undef SDL_AUDIO_DRIVER_COREAUDIO
#undef SDL_AUDIO_DRIVER_DISK
@ -219,7 +219,7 @@
#undef SDL_INPUT_LINUXEV
#undef SDL_INPUT_LINUXKD
#undef SDL_INPUT_TSLIB
#undef SDL_JOYSTICK_BEOS
#undef SDL_JOYSTICK_HAIKU
#undef SDL_JOYSTICK_DINPUT
#undef SDL_JOYSTICK_DUMMY
#undef SDL_JOYSTICK_IOKIT
@ -233,7 +233,7 @@
#undef SDL_HAPTIC_DINPUT
/* Enable various shared object loading systems */
#undef SDL_LOADSO_BEOS
#undef SDL_LOADSO_HAIKU
#undef SDL_LOADSO_DLOPEN
#undef SDL_LOADSO_DUMMY
#undef SDL_LOADSO_LDG
@ -246,13 +246,13 @@
#undef SDL_THREAD_WINDOWS
/* Enable various timer systems */
#undef SDL_TIMER_BEOS
#undef SDL_TIMER_HAIKU
#undef SDL_TIMER_DUMMY
#undef SDL_TIMER_UNIX
#undef SDL_TIMER_WINDOWS
/* Enable various video drivers */
#undef SDL_VIDEO_DRIVER_BWINDOW
#undef SDL_VIDEO_DRIVER_HAIKU
#undef SDL_VIDEO_DRIVER_COCOA
#undef SDL_VIDEO_DRIVER_DIRECTFB
#undef SDL_VIDEO_DRIVER_DIRECTFB_DYNAMIC
@ -303,11 +303,11 @@
#undef SDL_POWER_LINUX
#undef SDL_POWER_WINDOWS
#undef SDL_POWER_MACOSX
#undef SDL_POWER_BEOS
#undef SDL_POWER_HAIKU
#undef SDL_POWER_HARDWIRED
/* Enable system filesystem support */
#undef SDL_FILESYSTEM_BEOS
#undef SDL_FILESYSTEM_HAIKU
#undef SDL_FILESYSTEM_COCOA
#undef SDL_FILESYSTEM_DUMMY
#undef SDL_FILESYSTEM_UNIX

View File

@ -32,10 +32,6 @@
#undef __AIX__
#define __AIX__ 1
#endif
#if defined(__BEOS__)
#undef __BEOS__
#define __BEOS__ 1
#endif
#if defined(__HAIKU__)
#undef __HAIKU__
#define __HAIKU__ 1

View File

@ -119,7 +119,7 @@ SDL_CreateThread(SDL_ThreadFunction fn, const char *name, void *data,
* Create a thread.
*
* Thread naming is a little complicated: Most systems have very small
* limits for the string length (BeOS has 32 bytes, Linux currently has 16,
* limits for the string length (Haiku has 32 bytes, Linux currently has 16,
* Visual C++ 6.0 has nine!), and possibly other arbitrary rules. You'll
* have to see what happens with your system's debugger. The name should be
* UTF-8 (but using the naming limits of C identifiers is a better bet).

View File

@ -396,8 +396,6 @@ SDL_GetPlatform()
return "AIX";
#elif __ANDROID__
return "Android";
#elif __BEOS__
return "BeOS";
#elif __BSDI__
return "BSDI";
#elif __DREAMCAST__

View File

@ -56,7 +56,7 @@ extern AudioBootStrap XAUDIO2_bootstrap;
extern AudioBootStrap DSOUND_bootstrap;
extern AudioBootStrap WINMM_bootstrap;
extern AudioBootStrap PAUDIO_bootstrap;
extern AudioBootStrap BEOSAUDIO_bootstrap;
extern AudioBootStrap HAIKUAUDIO_bootstrap;
extern AudioBootStrap COREAUDIO_bootstrap;
extern AudioBootStrap SNDMGR_bootstrap;
extern AudioBootStrap DISKAUD_bootstrap;
@ -113,8 +113,8 @@ static const AudioBootStrap *const bootstrap[] = {
#if SDL_AUDIO_DRIVER_PAUDIO
&PAUDIO_bootstrap,
#endif
#if SDL_AUDIO_DRIVER_BEOSAUDIO
&BEOSAUDIO_bootstrap,
#if SDL_AUDIO_DRIVER_HAIKU
&HAIKUAUDIO_bootstrap,
#endif
#if SDL_AUDIO_DRIVER_COREAUDIO
&COREAUDIO_bootstrap,

View File

@ -20,14 +20,14 @@
*/
#include "SDL_config.h"
#if SDL_AUDIO_DRIVER_BEOSAUDIO
#if SDL_AUDIO_DRIVER_HAIKU
/* Allow access to the audio stream on BeOS */
/* Allow access to the audio stream on Haiku */
#include <SoundPlayer.h>
#include <signal.h>
#include "../../main/beos/SDL_BeApp.h"
#include "../../main/haiku/SDL_BeApp.h"
extern "C"
{
@ -35,13 +35,13 @@ extern "C"
#include "SDL_audio.h"
#include "../SDL_audio_c.h"
#include "../SDL_sysaudio.h"
#include "SDL_beaudio.h"
#include "SDL_haikuaudio.h"
}
/* !!! FIXME: have the callback call the higher level to avoid code dupe. */
/* The BeOS callback for handling the audio buffer */
/* The Haiku callback for handling the audio buffer */
static void
FillSound(void *device, void *stream, size_t len,
const media_raw_audio_format & format)
@ -71,7 +71,7 @@ FillSound(void *device, void *stream, size_t len,
}
static void
BEOSAUDIO_CloseDevice(_THIS)
HAIKUAUDIO_CloseDevice(_THIS)
{
if (_this->hidden != NULL) {
if (_this->hidden->audio_obj) {
@ -111,7 +111,7 @@ UnmaskSignals(sigset_t * omask)
static int
BEOSAUDIO_OpenDevice(_THIS, const char *devname, int iscapture)
HAIKUAUDIO_OpenDevice(_THIS, const char *devname, int iscapture)
{
int valid_datatype = 0;
media_raw_audio_format format;
@ -176,7 +176,7 @@ BEOSAUDIO_OpenDevice(_THIS, const char *devname, int iscapture)
}
if (!valid_datatype) { /* shouldn't happen, but just in case... */
BEOSAUDIO_CloseDevice(_this);
HAIKUAUDIO_CloseDevice(_this);
return SDL_SetError("Unsupported audio format");
}
@ -195,7 +195,7 @@ BEOSAUDIO_OpenDevice(_THIS, const char *devname, int iscapture)
if (_this->hidden->audio_obj->Start() == B_NO_ERROR) {
_this->hidden->audio_obj->SetHasData(true);
} else {
BEOSAUDIO_CloseDevice(_this);
HAIKUAUDIO_CloseDevice(_this);
return SDL_SetError("Unable to start Be audio");
}
@ -204,13 +204,13 @@ BEOSAUDIO_OpenDevice(_THIS, const char *devname, int iscapture)
}
static void
BEOSAUDIO_Deinitialize(void)
HAIKUAUDIO_Deinitialize(void)
{
SDL_QuitBeApp();
}
static int
BEOSAUDIO_Init(SDL_AudioDriverImpl * impl)
HAIKUAUDIO_Init(SDL_AudioDriverImpl * impl)
{
/* Initialize the Be Application, if it's not already started */
if (SDL_InitBeApp() < 0) {
@ -218,9 +218,9 @@ BEOSAUDIO_Init(SDL_AudioDriverImpl * impl)
}
/* Set the function pointers */
impl->OpenDevice = BEOSAUDIO_OpenDevice;
impl->CloseDevice = BEOSAUDIO_CloseDevice;
impl->Deinitialize = BEOSAUDIO_Deinitialize;
impl->OpenDevice = HAIKUAUDIO_OpenDevice;
impl->CloseDevice = HAIKUAUDIO_CloseDevice;
impl->Deinitialize = HAIKUAUDIO_Deinitialize;
impl->ProvidesOwnCallbackThread = 1;
impl->OnlyHasDefaultOutputDevice = 1;
@ -229,12 +229,12 @@ BEOSAUDIO_Init(SDL_AudioDriverImpl * impl)
extern "C"
{
extern AudioBootStrap BEOSAUDIO_bootstrap;
extern AudioBootStrap HAIKUAUDIO_bootstrap;
}
AudioBootStrap BEOSAUDIO_bootstrap = {
"baudio", "BeOS BSoundPlayer", BEOSAUDIO_Init, 0
AudioBootStrap HAIKUAUDIO_bootstrap = {
"haiku", "Haiku BSoundPlayer", HAIKUAUDIO_Init, 0
};
#endif /* SDL_AUDIO_DRIVER_BEOSAUDIO */
#endif /* SDL_AUDIO_DRIVER_HAIKU */
/* vi: set ts=4 sw=4 expandtab: */

View File

@ -24,8 +24,8 @@
/* Useful functions and variables from SDL_sysevents.c */
#if defined(__BEOS__) || defined(__HAIKU__)
/* The Be and Haiku event loops run in a separate thread */
#if defined(__HAIKU__)
/* The Haiku event loops run in a separate thread */
#define MUST_THREAD_EVENTS
#endif

View File

@ -20,7 +20,7 @@
*/
#include "SDL_config.h"
#ifdef SDL_FILESYSTEM_BEOS
#ifdef SDL_FILESYSTEM_HAIKU
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* System dependent filesystem routines */
@ -82,12 +82,12 @@ SDL_GetPrefPath(const char *org, const char *app)
SDL_OutOfMemory();
} else {
SDL_snprintf(retval, len, "%s%s%s/%s/", home, append, org, app);
create_directory(retval, 0700); // BeOS api: creates missing dirs
create_directory(retval, 0700); // Haiku api: creates missing dirs
}
return retval;
}
#endif /* SDL_FILESYSTEM_BEOS */
#endif /* SDL_FILESYSTEM_HAIKU */
/* vi: set ts=4 sw=4 expandtab: */

View File

@ -20,12 +20,12 @@
*/
#include "SDL_config.h"
#ifdef SDL_JOYSTICK_BEOS
#ifdef SDL_JOYSTICK_HAIKU
/* This is the system specific header for the SDL joystick API */
#include <be/support/String.h>
#include <be/device/Joystick.h>
#include <os/support/String.h>
#include <os/device/Joystick.h>
extern "C"
{
@ -276,5 +276,6 @@ extern "C"
}; // extern "C"
#endif /* SDL_JOYSTICK_BEOS */
#endif /* SDL_JOYSTICK_HAIKU */
/* vi: set ts=4 sw=4 expandtab: */

View File

@ -20,13 +20,13 @@
*/
#include "SDL_config.h"
#ifdef SDL_LOADSO_BEOS
#ifdef SDL_LOADSO_HAIKU
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* System dependent library loading routines */
#include <stdio.h>
#include <be/kernel/image.h>
#include <os/kernel/image.h>
#include "SDL_loadso.h"
@ -66,6 +66,6 @@ SDL_UnloadObject(void *handle)
}
}
#endif /* SDL_LOADSO_BEOS */
#endif /* SDL_LOADSO_HAIKU */
/* vi: set ts=4 sw=4 expandtab: */

View File

@ -24,7 +24,7 @@
#include <InterfaceKit.h>
#include <OpenGLKit.h>
#include "../../video/bwindow/SDL_bkeyboard.h"
#include "../../video/haiku/SDL_bkeyboard.h"
#ifdef __cplusplus
@ -37,8 +37,8 @@ extern "C" {
/* Local includes */
#include "../../events/SDL_events_c.h"
#include "../../video/bwindow/SDL_bkeyboard.h"
#include "../../video/bwindow/SDL_bframebuffer.h"
#include "../../video/haiku/SDL_bkeyboard.h"
#include "../../video/haiku/SDL_bframebuffer.h"
#ifdef __cplusplus
}

View File

@ -20,7 +20,7 @@
*/
#include "SDL_config.h"
#if defined(__BEOS__) || defined(__HAIKU__)
#if defined(__HAIKU__)
/* Handle the BeApp specific portions of the application */
@ -35,7 +35,7 @@
#include "SDL_timer.h"
#include "SDL_error.h"
#include "../../video/bwindow/SDL_BWin.h"
#include "../../video/haiku/SDL_BWin.h"
#ifdef __cplusplus
extern "C" {
@ -131,6 +131,6 @@ void SDL_BApp::ClearID(SDL_BWin *bwin) {
}
}
#endif /* __BEOS__ */
#endif /* __HAIKU__ */
/* vi: set ts=4 sw=4 expandtab: */

View File

@ -33,7 +33,7 @@ SDL_bool SDL_GetPowerInfo_Linux_proc_acpi(SDL_PowerState *, int *, int *);
SDL_bool SDL_GetPowerInfo_Linux_proc_apm(SDL_PowerState *, int *, int *);
SDL_bool SDL_GetPowerInfo_Windows(SDL_PowerState *, int *, int *);
SDL_bool SDL_GetPowerInfo_MacOSX(SDL_PowerState *, int *, int *);
SDL_bool SDL_GetPowerInfo_BeOS(SDL_PowerState *, int *, int *);
SDL_bool SDL_GetPowerInfo_Haiku(SDL_PowerState *, int *, int *);
SDL_bool SDL_GetPowerInfo_UIKit(SDL_PowerState *, int *, int *);
SDL_bool SDL_GetPowerInfo_Android(SDL_PowerState *, int *, int *);
SDL_bool SDL_GetPowerInfo_PSP(SDL_PowerState *, int *, int *);
@ -68,8 +68,8 @@ static SDL_GetPowerInfo_Impl implementations[] = {
#ifdef SDL_POWER_MACOSX /* handles Mac OS X, Darwin. */
SDL_GetPowerInfo_MacOSX,
#endif
#ifdef SDL_POWER_BEOS /* handles BeOS, Zeta, with euc.jp apm driver. */
SDL_GetPowerInfo_BeOS,
#ifdef SDL_POWER_HAIKU /* with BeOS euc.jp apm driver. Does this work on Haiku? */
SDL_GetPowerInfo_Haiku,
#endif
#ifdef SDL_POWER_ANDROID /* handles Android. */
SDL_GetPowerInfo_Android,

View File

@ -20,8 +20,9 @@
*/
#include "SDL_config.h"
/* !!! FIXME: does this thing even work on Haiku? */
#ifndef SDL_POWER_DISABLED
#if SDL_POWER_BEOS
#if SDL_POWER_HAIKU
#include <stdio.h>
#include <stdlib.h>
@ -40,7 +41,7 @@
#include "SDL_power.h"
SDL_bool
SDL_GetPowerInfo_BeOS(SDL_PowerState * state, int *seconds, int *percent)
SDL_GetPowerInfo_Haiku(SDL_PowerState * state, int *seconds, int *percent)
{
const int fd = open("/dev/misc/apm", O_RDONLY);
SDL_bool need_details = SDL_FALSE;
@ -119,7 +120,7 @@ SDL_GetPowerInfo_BeOS(SDL_PowerState * state, int *seconds, int *percent)
return SDL_TRUE; /* the definitive answer if APM driver replied. */
}
#endif /* SDL_POWER_BEOS */
#endif /* SDL_POWER_HAIKU */
#endif /* SDL_POWER_DISABLED */
/* vi: set ts=4 sw=4 expandtab: */

View File

@ -20,9 +20,9 @@
*/
#include "SDL_config.h"
#ifdef SDL_TIMER_BEOS
#ifdef SDL_TIMER_HAIKU
#include <be/kernel/OS.h>
#include <os/kernel/OS.h>
#include "SDL_timer.h"
@ -69,6 +69,6 @@ SDL_Delay(Uint32 ms)
snooze(ms * 1000);
}
#endif /* SDL_TIMER_BEOS */
#endif /* SDL_TIMER_HAIKU */
/* vi: set ts=4 sw=4 expandtab: */

View File

@ -348,8 +348,8 @@ extern VideoBootStrap DirectFB_bootstrap;
#if SDL_VIDEO_DRIVER_WINDOWS
extern VideoBootStrap WINDOWS_bootstrap;
#endif
#if SDL_VIDEO_DRIVER_BWINDOW
extern VideoBootStrap BWINDOW_bootstrap;
#if SDL_VIDEO_DRIVER_HAIKU
extern VideoBootStrap HAIKU_bootstrap;
#endif
#if SDL_VIDEO_DRIVER_PANDORA
extern VideoBootStrap PND_bootstrap;

View File

@ -65,8 +65,8 @@ static VideoBootStrap *bootstrap[] = {
#if SDL_VIDEO_DRIVER_WINDOWS
&WINDOWS_bootstrap,
#endif
#if SDL_VIDEO_DRIVER_BWINDOW
&BWINDOW_bootstrap,
#if SDL_VIDEO_DRIVER_HAIKU
&HAIKU_bootstrap,
#endif
#if SDL_VIDEO_DRIVER_PANDORA
&PND_bootstrap,

View File

@ -43,7 +43,7 @@ extern "C" {
#include <be/opengl/GLView.h>
#endif
#include "SDL_events.h"
#include "../../main/beos/SDL_BApp.h"
#include "../../main/haiku/SDL_BApp.h"
enum WinCommands {
@ -349,7 +349,7 @@ class SDL_BWin:public BDirectWindow
default:
/* move it after switch{} so it's always handled
that way we keep BeOS feautures like:
that way we keep Haiku features like:
- CTRL+Q to close window (and other shortcuts)
- PrintScreen to make screenshot into /boot/home
- etc.. */

View File

@ -20,7 +20,7 @@
*/
#include "SDL_config.h"
#if SDL_VIDEO_DRIVER_BWINDOW
#if SDL_VIDEO_DRIVER_HAIKU
/* BWindow based framebuffer implementation */
@ -92,4 +92,4 @@ SDL_bool BE_HasClipboardText(_THIS) {
}
#endif
#endif /* SDL_VIDEO_DRIVER_BWINDOW */
#endif /* SDL_VIDEO_DRIVER_HAIKU */

View File

@ -20,7 +20,7 @@
*/
#include "SDL_config.h"
#if SDL_VIDEO_DRIVER_BWINDOW
#if SDL_VIDEO_DRIVER_HAIKU
#include "SDL_bevents.h"
@ -36,4 +36,4 @@ void BE_PumpEvents(_THIS) {
}
#endif
#endif /* SDL_VIDEO_DRIVER_BWINDOW */
#endif /* SDL_VIDEO_DRIVER_HAIKU */

View File

@ -20,7 +20,7 @@
*/
#include "SDL_config.h"
#if SDL_VIDEO_DRIVER_BWINDOW
#if SDL_VIDEO_DRIVER_HAIKU
#include "SDL_bframebuffer.h"
@ -29,7 +29,7 @@
#include "SDL_bmodes.h"
#include "SDL_BWin.h"
#include "../../main/beos/SDL_BApp.h"
#include "../../main/haiku/SDL_BApp.h"
#ifdef __cplusplus
extern "C" {
@ -251,4 +251,4 @@ int32 BE_UpdateOnce(SDL_Window *window) {
}
#endif
#endif /* SDL_VIDEO_DRIVER_BWINDOW */
#endif /* SDL_VIDEO_DRIVER_HAIKU */

View File

@ -20,7 +20,7 @@
*/
#include "SDL_config.h"
#if SDL_VIDEO_DRIVER_BWINDOW
#if SDL_VIDEO_DRIVER_HAIKU
#include <SupportDefs.h>
#include <support/UTF8.h>
@ -185,4 +185,4 @@ void BE_SetKeyState(int32 bkey, int8 state) {
}
#endif
#endif /* SDL_VIDEO_DRIVER_BWINDOW */
#endif /* SDL_VIDEO_DRIVER_HAIKU */

View File

@ -20,7 +20,7 @@
*/
#include "SDL_config.h"
#if SDL_VIDEO_DRIVER_BWINDOW
#if SDL_VIDEO_DRIVER_HAIKU
#include <AppKit.h>
#include <InterfaceKit.h>
@ -31,7 +31,7 @@
#include "SDL_bopengl.h"
#endif
#include "../../main/beos/SDL_BApp.h"
#include "../../main/haiku/SDL_BApp.h"
#ifdef __cplusplus
extern "C" {
@ -328,4 +328,4 @@ int BE_SetDisplayMode(_THIS, SDL_VideoDisplay *display, SDL_DisplayMode *mode){
}
#endif
#endif /* SDL_VIDEO_DRIVER_BWINDOW */
#endif /* SDL_VIDEO_DRIVER_HAIKU */

View File

@ -20,7 +20,7 @@
*/
#include "SDL_config.h"
#if SDL_VIDEO_DRIVER_BWINDOW
#if SDL_VIDEO_DRIVER_HAIKU
#include "SDL_bopengl.h"
@ -28,7 +28,7 @@
#include <KernelKit.h>
#include <OpenGLKit.h>
#include "SDL_BWin.h"
#include "../../main/beos/SDL_BApp.h"
#include "../../main/haiku/SDL_BApp.h"
#ifdef __cplusplus
extern "C" {
@ -216,4 +216,4 @@ void BE_GL_RebootContexts(_THIS) {
}
#endif
#endif /* SDL_VIDEO_DRIVER_BWINDOW */
#endif /* SDL_VIDEO_DRIVER_HAIKU */

View File

@ -20,7 +20,7 @@
*/
#include "SDL_config.h"
#if SDL_VIDEO_DRIVER_BWINDOW
#if SDL_VIDEO_DRIVER_HAIKU
#ifdef __cplusplus
@ -119,8 +119,8 @@ BE_CreateDevice(int devindex)
return device;
}
VideoBootStrap BWINDOW_bootstrap = {
"bwindow", "BDirectWindow graphics",
VideoBootStrap HAIKU_bootstrap = {
"haiku", "Haiku graphics",
BE_Available, BE_CreateDevice
};
@ -171,4 +171,4 @@ void BE_VideoQuit(_THIS)
}
#endif
#endif /* SDL_VIDEO_DRIVER_BWINDOW */
#endif /* SDL_VIDEO_DRIVER_HAIKU */

View File

@ -26,7 +26,7 @@
extern "C" {
#endif
#include "../../main/beos/SDL_BeApp.h"
#include "../../main/haiku/SDL_BeApp.h"
#include "../SDL_sysvideo.h"

View File

@ -20,7 +20,7 @@
*/
#include "SDL_config.h"
#if SDL_VIDEO_DRIVER_BWINDOW
#if SDL_VIDEO_DRIVER_HAIKU
#include "../SDL_sysvideo.h"
#include "SDL_BWin.h"
@ -122,7 +122,7 @@ void BE_SetWindowTitle(_THIS, SDL_Window * window) {
}
void BE_SetWindowIcon(_THIS, SDL_Window * window, SDL_Surface * icon) {
/* FIXME: Icons not supported by BeOs/Haiku */
/* FIXME: Icons not supported by Haiku */
}
void BE_SetWindowPosition(_THIS, SDL_Window * window) {
@ -185,12 +185,12 @@ void BE_SetWindowFullscreen(_THIS, SDL_Window * window,
}
int BE_SetWindowGammaRamp(_THIS, SDL_Window * window, const Uint16 * ramp) {
/* FIXME: Not BeOs/Haiku supported */
/* FIXME: Not Haiku supported */
return -1;
}
int BE_GetWindowGammaRamp(_THIS, SDL_Window * window, Uint16 * ramp) {
/* FIXME: Not BeOs/Haiku supported */
/* FIXME: Not Haiku supported */
return -1;
}
@ -220,4 +220,4 @@ SDL_bool BE_GetWindowWMInfo(_THIS, SDL_Window * window,
}
#endif
#endif /* SDL_VIDEO_DRIVER_BWINDOW */
#endif /* SDL_VIDEO_DRIVER_HAIKU */

2
test/configure vendored
View File

@ -2902,7 +2902,7 @@ case "$host" in
MATHLIB=""
SYS_GL_LIBS="-lopengl32"
;;
*-*-beos* | *-*-haiku*)
*-*-haiku*)
EXE=""
MATHLIB=""
SYS_GL_LIBS="-lGL"

View File

@ -15,7 +15,7 @@ AC_C_CONST
dnl We only care about this for building testnative at the moment, so these
dnl values shouldn't be considered absolute truth.
dnl (BeOS, for example, sets none of these.)
dnl (Haiku, for example, sets none of these.)
ISUNIX="false"
ISWINDOWS="false"
ISMACOSX="false"
@ -28,7 +28,7 @@ case "$host" in
MATHLIB=""
SYS_GL_LIBS="-lopengl32"
;;
*-*-beos* | *-*-haiku*)
*-*-haiku*)
EXE=""
MATHLIB=""
SYS_GL_LIBS="-lGL"

View File

@ -2906,7 +2906,7 @@ case "$host" in
EXTRALIB="-lshlwapi"
SYS_GL_LIBS="-lopengl32"
;;
*-*-beos* | *-*-haiku*)
*-*-haiku*)
EXE=""
MATHLIB=""
EXTRALIB=""

View File

@ -15,7 +15,7 @@ AC_C_CONST
dnl We only care about this for building testnative at the moment, so these
dnl values shouldn't be considered absolute truth.
dnl (BeOS, for example, sets none of these.)
dnl (Haiku, for example, sets none of these.)
ISUNIX="false"
ISWINDOWS="false"
ISMACOSX="false"
@ -29,7 +29,7 @@ case "$host" in
EXTRALIB="-lshlwapi"
SYS_GL_LIBS="-lopengl32"
;;
*-*-beos* | *-*-haiku*)
*-*-haiku*)
EXE=""
MATHLIB=""
EXTRALIB=""