Renamed things named after BeOS to be named after Haiku instead.

This commit is contained in:
Ryan C. Gordon
2013-11-14 11:51:24 -05:00
parent 85dd689ff9
commit 00003e8c00
45 changed files with 176 additions and 167 deletions

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 */