Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Lots of fixes importing SDL source wholesale into a new iOS project

  • Loading branch information
slouken committed Oct 31, 2011
1 parent 60e5a6f commit 43ced8fb5282bece41fa8a93448c90667b8ab837
Showing with 496 additions and 1,096 deletions.
  1. +0 −1 include/SDL_config.h.in
  2. +4 −0 include/SDL_opengl.h
  3. +3 −0 src/SDL_error_c.h
  4. +7 −3 src/audio/alsa/SDL_alsa_audio.c
  5. +4 −0 src/audio/android/SDL_androidaudio.c
  6. +6 −2 src/audio/arts/SDL_artsaudio.c
  7. +4 −0 src/audio/baudio/SDL_beaudio.cc
  8. +4 −0 src/audio/bsd/SDL_bsdaudio.c
  9. +4 −0 src/audio/directsound/SDL_directsound.c
  10. +4 −0 src/audio/disk/SDL_diskaudio.c
  11. +4 −0 src/audio/dsp/SDL_dspaudio.c
  12. +6 −2 src/audio/esd/SDL_esdaudio.c
  13. +6 −2 src/audio/fusionsound/SDL_fsaudio.c
  14. +6 −2 src/audio/nas/SDL_nasaudio.c
  15. +4 −0 src/audio/nds/SDL_ndsaudio.c
  16. +4 −0 src/audio/paudio/SDL_paudio.c
  17. +1 −1 src/audio/pulseaudio/SDL_pulseaudio.c
  18. +4 −0 src/audio/qsa/SDL_qsa_audio.c
  19. +9 −5 src/audio/sun/SDL_sunaudio.c
  20. +0 −556 src/audio/ums/SDL_umsaudio.c
  21. +0 −47 src/audio/ums/SDL_umsaudio.h
  22. +4 −0 src/audio/winmm/SDL_winmm.c
  23. +3 −2 src/audio/xaudio2/SDL_xaudio2.c
  24. +4 −0 src/core/android/SDL_android.cpp
  25. +4 −0 src/core/windows/SDL_windows.c
  26. +9 −22 src/events/SDL_gesture.c
  27. +0 −17 src/events/SDL_keyboard.c
  28. +2 −1 src/events/SDL_touch.c
  29. +1 −1 src/libm/e_atan2.c
  30. +1 −1 src/libm/e_log.c
  31. +1 −1 src/libm/e_pow.c
  32. +1 −1 src/libm/e_rem_pio2.c
  33. +1 −1 src/libm/e_sqrt.c
  34. +1 −1 src/libm/k_cos.c
  35. +1 −1 src/libm/k_rem_pio2.c
  36. +1 −1 src/libm/k_sin.c
  37. +7 −0 src/libm/{math.h → math_libm.h}
  38. +1 −1 src/libm/s_atan.c
  39. +1 −1 src/libm/s_copysign.c
  40. +1 −1 src/libm/s_cos.c
  41. +1 −1 src/libm/s_fabs.c
  42. +1 −1 src/libm/s_floor.c
  43. +1 −1 src/libm/s_scalbn.c
  44. +1 −1 src/libm/s_sin.c
  45. +6 −0 src/main/android/SDL_android_main.cpp
  46. +6 −2 src/main/beos/SDL_BeApp.cc
  47. +5 −0 src/main/windows/SDL_windows_main.c
  48. +1 −1 src/power/beos/SDL_syspower.c
  49. +1 −1 src/power/linux/SDL_syspower.c
  50. +1 −1 src/power/macosx/SDL_syspower.c
  51. +1 −1 src/power/nds/SDL_syspower.c
  52. +7 −2 src/{thread/irix/SDL_systhread_c.h → power/uikit/SDL_syspower.h}
  53. +2 −1 src/power/uikit/SDL_syspower.m
  54. +1 −1 src/power/windows/SDL_syspower.c
  55. +1 −1 src/render/SDL_render.c
  56. +0 −3 src/render/opengles/SDL_render_gles.c
  57. +0 −3 src/render/opengles2/SDL_render_gles2.c
  58. +1 −0 src/render/software/SDL_render_sw.c
  59. +1 −1 src/stdlib/SDL_string.c
  60. +1 −0 src/thread/SDL_thread.c
  61. +1 −2 src/thread/SDL_thread_c.h
  62. +4 −0 src/thread/beos/SDL_syssem.c
  63. +4 −0 src/thread/beos/SDL_systhread.c
  64. +0 −230 src/thread/irix/SDL_syssem.c
  65. +0 −81 src/thread/irix/SDL_systhread.c
  66. +0 −6 src/thread/nds/SDL_systhread.c
  67. +4 −0 src/thread/windows/SDL_sysmutex.c
  68. +4 −0 src/thread/windows/SDL_syssem.c
  69. +4 −0 src/thread/windows/SDL_systhread.c
  70. +7 −1 src/thread/windows/win_ce_semaphore.c
  71. +1 −0 src/video/SDL_rect.c
  72. +2 −2 src/video/SDL_shape.c
  73. +2 −8 src/video/SDL_video.c
  74. +4 −0 src/video/android/SDL_androidevents.c
  75. +4 −0 src/video/android/SDL_androidgl.c
  76. +4 −0 src/video/android/SDL_androidkeyboard.c
  77. +4 −0 src/video/android/SDL_androidtouch.c
  78. +4 −0 src/video/android/SDL_androidvideo.c
  79. +4 −0 src/video/android/SDL_androidwindow.c
  80. +3 −1 src/video/bwindow/SDL_bclipboard.cc
  81. +5 −0 src/video/bwindow/SDL_bevents.cc
  82. +5 −0 src/video/bwindow/SDL_bframebuffer.cc
  83. +5 −0 src/video/bwindow/SDL_bkeyboard.cc
  84. +4 −1 src/video/bwindow/SDL_bmodes.cc
  85. +5 −5 src/video/bwindow/SDL_bopengl.cc
  86. +4 −1 src/video/bwindow/SDL_bvideo.cc
  87. +3 −0 src/video/bwindow/SDL_bwindow.cc
  88. +4 −0 src/video/cocoa/SDL_cocoaclipboard.m
  89. +4 −0 src/video/cocoa/SDL_cocoaevents.m
  90. +5 −1 src/video/cocoa/SDL_cocoakeyboard.m
  91. +5 −1 src/video/cocoa/SDL_cocoamodes.m
  92. +4 −15 src/video/cocoa/SDL_cocoamouse.m
  93. +2 −2 src/video/cocoa/SDL_cocoaopengl.m
  94. +10 −0 src/video/cocoa/SDL_cocoashape.m
  95. +4 −0 src/video/cocoa/SDL_cocoavideo.m
  96. +4 −2 src/video/cocoa/SDL_cocoawindow.m
  97. +4 −0 src/video/directfb/SDL_DirectFB_WM.c
  98. +4 −1 src/video/directfb/SDL_DirectFB_dyn.c
  99. +4 −0 src/video/directfb/SDL_DirectFB_events.c
  100. +5 −0 src/video/directfb/SDL_DirectFB_modes.c
  101. +5 −1 src/video/directfb/SDL_DirectFB_mouse.c
  102. +5 −0 src/video/directfb/SDL_DirectFB_opengl.c
  103. +5 −0 src/video/directfb/SDL_DirectFB_render.c
  104. +4 −0 src/video/directfb/SDL_DirectFB_shape.c
  105. +5 −0 src/video/directfb/SDL_DirectFB_video.c
  106. +5 −0 src/video/directfb/SDL_DirectFB_window.c
  107. +4 −0 src/video/dummy/SDL_nullevents.c
  108. +5 −0 src/video/dummy/SDL_nullframebuffer.c
  109. +4 −0 src/video/dummy/SDL_nullvideo.c
  110. +3 −2 src/video/nds/SDL_ndsevents.c
  111. +4 −0 src/video/nds/SDL_ndsvideo.c
  112. +4 −0 src/video/nds/SDL_ndswindow.c
  113. +5 −1 src/video/pandora/SDL_pandora.c
  114. +4 −0 src/video/pandora/SDL_pandora_events.c
  115. +5 −0 src/video/uikit/SDL_uikitappdelegate.m
  116. +4 −0 src/video/uikit/SDL_uikitevents.m
  117. +6 −3 src/video/uikit/SDL_uikitopengles.m
  118. +5 −0 src/video/uikit/SDL_uikitopenglview.m
  119. +5 −3 src/video/uikit/SDL_uikitvideo.m
  120. +7 −1 src/video/uikit/SDL_uikitview.m
  121. +23 −19 src/video/uikit/SDL_uikitviewcontroller.m
  122. +9 −5 src/video/uikit/SDL_uikitwindow.m
  123. +4 −0 src/video/windows/SDL_windowsclipboard.c
  124. +4 −1 src/video/windows/SDL_windowsevents.c
  125. +4 −0 src/video/windows/SDL_windowsframebuffer.c
  126. +4 −0 src/video/windows/SDL_windowskeyboard.c
  127. +4 −0 src/video/windows/SDL_windowsmodes.c
  128. +4 −1 src/video/windows/SDL_windowsmouse.c
  129. +4 −0 src/video/windows/SDL_windowsopengl.c
  130. +5 −1 src/video/windows/SDL_windowsshape.c
  131. +4 −0 src/video/windows/SDL_windowsvideo.c
  132. +4 −0 src/video/windows/SDL_windowswindow.c
  133. +5 −0 src/video/x11/SDL_x11opengl.c
  134. +2 −2 src/video/x11/SDL_x11opengles.c
  135. +5 −0 src/video/x11/imKStoUCS.c
@@ -233,7 +233,6 @@
#undef SDL_THREAD_PTHREAD
#undef SDL_THREAD_PTHREAD_RECURSIVE_MUTEX
#undef SDL_THREAD_PTHREAD_RECURSIVE_MUTEX_NP
#undef SDL_THREAD_SPROC
#undef SDL_THREAD_WINDOWS

/* Enable various timer systems */
@@ -30,6 +30,8 @@

#include "SDL_config.h"

#ifndef __IPHONEOS__

#ifdef __WIN32__
#define WIN32_LEAN_AND_MEAN
#ifndef NOMINMAX
/* *INDENT-ON* */
#endif /* NO_SDL_GLEXT */

#endif /* !__IPHONEOS__ */

#endif /* _SDL_opengl_h */

/* vi: set ts=4 sw=4 expandtab: */
@@ -56,6 +56,9 @@ typedef struct SDL_error
} args[ERR_MAX_ARGS];
} SDL_error;

/* Defined in SDL_thread.c */
extern SDL_error *SDL_GetErrBuf(void);

#endif /* _SDL_error_c_h */

/* vi: set ts=4 sw=4 expandtab: */
@@ -20,6 +20,8 @@
*/
#include "SDL_config.h"

#if SDL_AUDIO_DRIVER_ALSA

/* Allow access to a raw mixing buffer */

#include <sys/types.h>
@@ -33,7 +35,7 @@
#include "../SDL_audio_c.h"
#include "SDL_alsa_audio.h"

#ifdef SDL_AUDIO_DRIVER_ALSA_DYNAMIC
#if SDL_AUDIO_DRIVER_ALSA_DYNAMIC
#include "SDL_loadso.h"
#endif

@@ -84,7 +86,7 @@ static int (*ALSA_snd_pcm_wait)(snd_pcm_t *, int);
static int (*ALSA_snd_pcm_sw_params_set_avail_min)
(snd_pcm_t *, snd_pcm_sw_params_t *, snd_pcm_uframes_t);

#ifdef SDL_AUDIO_DRIVER_ALSA_DYNAMIC
#if SDL_AUDIO_DRIVER_ALSA_DYNAMIC
#define snd_pcm_hw_params_sizeof ALSA_snd_pcm_hw_params_sizeof
#define snd_pcm_sw_params_sizeof ALSA_snd_pcm_sw_params_sizeof

@@ -147,7 +149,7 @@ load_alsa_syms(void)

#undef SDL_ALSA_SYM

#ifdef SDL_AUDIO_DRIVER_ALSA_DYNAMIC
#if SDL_AUDIO_DRIVER_ALSA_DYNAMIC

static void
UnloadALSALibrary(void)
@@ -693,4 +695,6 @@ AudioBootStrap ALSA_bootstrap = {
"alsa", "ALSA PCM audio", ALSA_Init, 0
};

#endif /* SDL_AUDIO_DRIVER_ALSA */

/* vi: set ts=4 sw=4 expandtab: */
@@ -20,6 +20,8 @@
*/
#include "SDL_config.h"

#if SDL_AUDIO_DRIVER_ANDROID

/* Output audio to Android */

#include "SDL_audio.h"
@@ -154,4 +156,6 @@ Android_RunAudioThread()
SDL_RunAudio(audioDevice);
}

#endif /* SDL_AUDIO_DRIVER_ANDROID */

/* vi: set ts=4 sw=4 expandtab: */
@@ -20,6 +20,8 @@
*/
#include "SDL_config.h"

#if SDL_AUDIO_DRIVER_ARTS

/* Allow access to a raw mixing buffer */

#ifdef HAVE_SIGNAL_H
@@ -34,14 +36,14 @@
#include "../SDL_audio_c.h"
#include "SDL_artsaudio.h"

#ifdef SDL_AUDIO_DRIVER_ARTS_DYNAMIC
#if SDL_AUDIO_DRIVER_ARTS_DYNAMIC
#include "SDL_name.h"
#include "SDL_loadso.h"
#else
#define SDL_NAME(X) X
#endif

#ifdef SDL_AUDIO_DRIVER_ARTS_DYNAMIC
#if SDL_AUDIO_DRIVER_ARTS_DYNAMIC

static const char *arts_library = SDL_AUDIO_DRIVER_ARTS_DYNAMIC;
static void *arts_handle = NULL;
@@ -372,4 +374,6 @@ AudioBootStrap ARTS_bootstrap = {
"arts", "Analog RealTime Synthesizer", ARTS_Init, 0
};

#endif /* SDL_AUDIO_DRIVER_ARTS */

/* vi: set ts=4 sw=4 expandtab: */
@@ -20,6 +20,8 @@
*/
#include "SDL_config.h"

#if SDL_AUDIO_DRIVER_BEOSAUDIO

/* Allow access to the audio stream on BeOS */

#include <SoundPlayer.h>
@@ -214,4 +216,6 @@ AudioBootStrap BEOSAUDIO_bootstrap = {
"baudio", "BeOS BSoundPlayer", BEOSAUDIO_Init, 0
};

#endif /* SDL_AUDIO_DRIVER_BEOSAUDIO */

/* vi: set ts=4 sw=4 expandtab: */
@@ -20,6 +20,8 @@
*/
#include "SDL_config.h"

#if SDL_AUDIO_DRIVER_BSD

/*
* Driver for native OpenBSD/NetBSD audio(4).
* vedge@vedge.com.ar.
@@ -364,4 +366,6 @@ AudioBootStrap BSD_AUDIO_bootstrap = {
"bsd", "BSD audio", BSDAUDIO_Init, 0
};

#endif /* SDL_AUDIO_DRIVER_BSD */

/* vi: set ts=4 sw=4 expandtab: */
@@ -20,6 +20,8 @@
*/
#include "SDL_config.h"

#if SDL_AUDIO_DRIVER_DSOUND

/* Allow access to a raw mixing buffer */

#include "SDL_timer.h"
@@ -549,4 +551,6 @@ AudioBootStrap DSOUND_bootstrap = {
"directsound", "DirectSound", DSOUND_Init, 0
};

#endif /* SDL_AUDIO_DRIVER_DSOUND */

/* vi: set ts=4 sw=4 expandtab: */
@@ -20,6 +20,8 @@
*/
#include "SDL_config.h"

#if SDL_AUDIO_DRIVER_DISK

/* Output raw audio data to a file. */

#if HAVE_STDIO_H
@@ -159,4 +161,6 @@ AudioBootStrap DISKAUD_bootstrap = {
"disk", "direct-to-disk audio", DISKAUD_Init, 1
};

#endif /* SDL_AUDIO_DRIVER_DISK */

/* vi: set ts=4 sw=4 expandtab: */
@@ -20,6 +20,8 @@
*/
#include "SDL_config.h"

#if SDL_AUDIO_DRIVER_OSS

/* Allow access to a raw mixing buffer */

#include <stdio.h> /* For perror() */
@@ -312,4 +314,6 @@ AudioBootStrap DSP_bootstrap = {
"dsp", "OSS /dev/dsp standard audio", DSP_Init, 0
};

#endif /* SDL_AUDIO_DRIVER_OSS */

/* vi: set ts=4 sw=4 expandtab: */
@@ -20,6 +20,8 @@
*/
#include "SDL_config.h"

#if SDL_AUDIO_DRIVER_ESD

/* Allow access to an ESD network stream mixing buffer */

#include <sys/types.h>
@@ -34,14 +36,14 @@
#include "../SDL_audio_c.h"
#include "SDL_esdaudio.h"

#ifdef SDL_AUDIO_DRIVER_ESD_DYNAMIC
#if SDL_AUDIO_DRIVER_ESD_DYNAMIC
#include "SDL_name.h"
#include "SDL_loadso.h"
#else
#define SDL_NAME(X) X
#endif

#ifdef SDL_AUDIO_DRIVER_ESD_DYNAMIC
#if SDL_AUDIO_DRIVER_ESD_DYNAMIC

static const char *esd_library = SDL_AUDIO_DRIVER_ESD_DYNAMIC;
static void *esd_handle = NULL;
@@ -345,4 +347,6 @@ AudioBootStrap ESD_bootstrap = {
"esd", "Enlightened Sound Daemon", ESD_Init, 0
};

#endif /* SDL_AUDIO_DRIVER_ESD */

/* vi: set ts=4 sw=4 expandtab: */
@@ -20,6 +20,8 @@
*/
#include "SDL_config.h"

#if SDL_AUDIO_DRIVER_FUSIONSOUND

/* Allow access to a raw mixing buffer */

#ifdef HAVE_SIGNAL_H
@@ -37,7 +39,7 @@

//#define SDL_AUDIO_DRIVER_FUSIONSOUND_DYNAMIC "libfusionsound.so"

#ifdef SDL_AUDIO_DRIVER_FUSIONSOUND_DYNAMIC
#if SDL_AUDIO_DRIVER_FUSIONSOUND_DYNAMIC
#include "SDL_name.h"
#include "SDL_loadso.h"
#else
@@ -51,7 +53,7 @@ typedef DFBResult DirectResult;
/* Buffers to use - more than 2 gives a lot of latency */
#define FUSION_BUFFERS (2)

#ifdef SDL_AUDIO_DRIVER_FUSIONSOUND_DYNAMIC
#if SDL_AUDIO_DRIVER_FUSIONSOUND_DYNAMIC

static const char *fs_library = SDL_AUDIO_DRIVER_FUSIONSOUND_DYNAMIC;
static void *fs_handle = NULL;
@@ -345,4 +347,6 @@ AudioBootStrap FUSIONSOUND_bootstrap = {
"fusionsound", "FusionSound", SDL_FS_Init, 0
};

#endif /* SDL_AUDIO_DRIVER_FUSIONSOUND */

/* vi: set ts=4 sw=4 expandtab: */
@@ -20,6 +20,8 @@
*/
#include "SDL_config.h"

#if SDL_AUDIO_DRIVER_NAS

/* Allow access to a raw mixing buffer */

#include <signal.h>
@@ -50,7 +52,7 @@ static AuEventHandlerRec *(*NAS_AuRegisterEventHandler)
(AuServer *, AuMask, int, AuID, AuEventHandlerCallback, AuPointer);


#ifdef SDL_AUDIO_DRIVER_NAS_DYNAMIC
#if SDL_AUDIO_DRIVER_NAS_DYNAMIC

static const char *nas_library = SDL_AUDIO_DRIVER_NAS_DYNAMIC;
static void *nas_handle = NULL;
@@ -89,7 +91,7 @@ load_nas_syms(void)

#undef SDL_NAS_SYM

#ifdef SDL_AUDIO_DRIVER_NAS_DYNAMIC
#if SDL_AUDIO_DRIVER_NAS_DYNAMIC

static void
UnloadNASLibrary(void)
@@ -397,4 +399,6 @@ AudioBootStrap NAS_bootstrap = {
"nas", "Network Audio System", NAS_Init, 0
};

#endif /* SDL_AUDIO_DRIVER_NAS */

/* vi: set ts=4 sw=4 expandtab: */
@@ -20,6 +20,8 @@
*/
#include "SDL_config.h"

#if SDL_AUDIO_DRIVER_NDS

/* Output audio to NDS */

#include <nds.h>
@@ -122,4 +124,6 @@ AudioBootStrap NDSAUD_bootstrap = {
"nds", "SDL NDS audio driver", NDSAUD_Init, 0 /*1? */
};

#endif /* SDL_AUDIO_DRIVER_NDS */

/* vi: set ts=4 sw=4 expandtab: */
@@ -20,6 +20,8 @@
*/
#include "SDL_config.h"

#if SDL_AUDIO_DRIVER_PAUDIO

/* Allow access to a raw mixing buffer */

#include <errno.h>
@@ -545,4 +547,6 @@ AudioBootStrap PAUDIO_bootstrap = {
"paud", "AIX Paudio", PAUDIO_Init, 0
};

#endif /* SDL_AUDIO_DRIVER_PAUDIO */

/* vi: set ts=4 sw=4 expandtab: */
@@ -106,7 +106,7 @@ static void (*PULSEAUDIO_pa_stream_unref) (pa_stream *);
static int load_pulseaudio_syms(void);


#ifdef SDL_AUDIO_DRIVER_PULSEAUDIO_DYNAMIC
#if SDL_AUDIO_DRIVER_PULSEAUDIO_DYNAMIC

static const char *pulseaudio_library = SDL_AUDIO_DRIVER_PULSEAUDIO_DYNAMIC;
static void *pulseaudio_handle = NULL;
@@ -21,6 +21,8 @@

#include "SDL_config.h"

#if SDL_AUDIO_DRIVER_QSA

#include <errno.h>
#include <unistd.h>
#include <fcntl.h>
@@ -863,4 +865,6 @@ AudioBootStrap QSAAUDIO_bootstrap = {
"qsa", "QNX QSA Audio", QSA_Init, 0
};

#endif /* SDL_AUDIO_DRIVER_QSA */

/* vi: set ts=4 sw=4 expandtab: */
@@ -1,8 +1,3 @@
/* I'm gambling no one uses this audio backend...we'll see who emails. :) */
#error this code has not been updated for SDL 1.3.
#error if no one emails icculus at icculus.org and tells him that this
#error code is needed, this audio backend will eventually be removed from SDL.

/*
Simple DirectMedia Layer
Copyright (C) 1997-2011 Sam Lantinga <slouken@libsdl.org>
@@ -25,6 +20,13 @@
*/
#include "SDL_config.h"

#if SDL_AUDIO_DRIVER_SUNAUDIO

/* I'm gambling no one uses this audio backend...we'll see who emails. :) */
#error this code has not been updated for SDL 1.3.
#error if no one emails icculus at icculus.org and tells him that this
#error code is needed, this audio backend will eventually be removed from SDL.

/* Allow access to a raw mixing buffer */

#include <fcntl.h>
@@ -450,4 +452,6 @@ snd2au(int sample)
return (mask & sample);
}

#endif /* SDL_AUDIO_DRIVER_SUNAUDIO */

/* vi: set ts=4 sw=4 expandtab: */

0 comments on commit 43ced8f

Please sign in to comment.