Some fixes that were discovered when trying to get OS/2 audio working again... SDL-ryan-multiple-audio-device
authorRyan C. Gordon <icculus@icculus.org>
Sun, 08 Oct 2006 08:58:36 +0000
branchSDL-ryan-multiple-audio-device
changeset 3840be9bd1067c6c
parent 3839 506fc6ca82cb
child 3841 3479f939987c
Some fixes that were discovered when trying to get OS/2 audio working again...
include/SDL_thread.h
src/audio/SDL_audio.c
src/events/SDL_mouse.c
src/video/SDL_rendercopy.h
     1.1 --- a/include/SDL_thread.h	Sun Oct 08 08:57:28 2006 +0000
     1.2 +++ b/include/SDL_thread.h	Sun Oct 08 08:58:36 2006 +0000
     1.3 @@ -91,7 +91,7 @@
     1.4  typedef void (__cdecl * pfnSDL_CurrentEndThread) (unsigned code);
     1.5  #endif
     1.6  
     1.7 -extern DECLSPEC SDL_Thread *SDLCALL SDL_CreateThread(int (*fn) (void *),
     1.8 +extern DECLSPEC SDL_Thread *SDLCALL SDL_CreateThread(int (SDLCALL * f) (void *),
     1.9                                                       void *data,
    1.10                                                       pfnSDL_CurrentBeginThread
    1.11                                                       pfnBeginThread,
     2.1 --- a/src/audio/SDL_audio.c	Sun Oct 08 08:57:28 2006 +0000
     2.2 +++ b/src/audio/SDL_audio.c	Sun Oct 08 08:58:36 2006 +0000
     2.3 @@ -614,7 +614,7 @@
     2.4          for (i = 0; i < SDL_arraysize(open_devices); i++) {
     2.5              if ((open_devices[i]) && (open_devices[i]->iscapture)) {
     2.6                  SDL_SetError("Audio device already open");
     2.7 -                return;
     2.8 +                return 0;
     2.9              }
    2.10          }
    2.11      }
    2.12 @@ -629,7 +629,7 @@
    2.13          for (i = 0; i < SDL_arraysize(open_devices); i++) {
    2.14              if ((open_devices[i]) && (!open_devices[i]->iscapture)) {
    2.15                  SDL_SetError("Audio device already open");
    2.16 -                return;
    2.17 +                return 0;
    2.18              }
    2.19          }
    2.20      }
     3.1 --- a/src/events/SDL_mouse.c	Sun Oct 08 08:57:28 2006 +0000
     3.2 +++ b/src/events/SDL_mouse.c	Sun Oct 08 08:58:36 2006 +0000
     3.3 @@ -165,7 +165,7 @@
     3.4      return mouse->focus;
     3.5  }
     3.6  
     3.7 -static int
     3.8 +static int SDLCALL
     3.9  FlushMouseMotion(void *param, SDL_Event * event)
    3.10  {
    3.11      if (event->type == SDL_MOUSEMOTION
     4.1 --- a/src/video/SDL_rendercopy.h	Sun Oct 08 08:57:28 2006 +0000
     4.2 +++ b/src/video/SDL_rendercopy.h	Sun Oct 08 08:58:36 2006 +0000
     4.3 @@ -33,10 +33,10 @@
     4.4  #define SDL_RENDERCOPY_NEAREST          0x0100
     4.5  
     4.6  typedef struct {
     4.7 -    void *src;
     4.8 +    Uint8 *src;
     4.9      int src_w, src_h;
    4.10      int src_pitch;
    4.11 -    void *dst;
    4.12 +    Uint8 *dst;
    4.13      int dst_w, dst_h;
    4.14      int dst_pitch;
    4.15      void *aux_data;
    4.16 @@ -44,7 +44,7 @@
    4.17      Uint8 r, g, b, a;
    4.18  } SDL_RenderCopyData;
    4.19  
    4.20 -typedef int (*SDL_RenderCopyFunc)(SDL_RenderCopyData *data);
    4.21 +typedef int (SDLCALL * SDL_RenderCopyFunc)(SDL_RenderCopyData *data);
    4.22  
    4.23  extern SDL_RenderCopyFunc SDLCALL SDL_GetRenderCopyFunc(Uint32 src_format, Uint32 dst_format, int modMode, int blendMode, int scaleMode);
    4.24