changeset 3840:be9bd1067c6c SDL-ryan-multiple-audio-device

Some fixes that were discovered when trying to get OS/2 audio working again...
author Ryan C. Gordon <icculus@icculus.org>
date Sun, 08 Oct 2006 08:58:36 +0000
parents 506fc6ca82cb
children 3479f939987c
files include/SDL_thread.h src/audio/SDL_audio.c src/events/SDL_mouse.c src/video/SDL_rendercopy.h
diffstat 4 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/include/SDL_thread.h	Sun Oct 08 08:57:28 2006 +0000
+++ b/include/SDL_thread.h	Sun Oct 08 08:58:36 2006 +0000
@@ -91,7 +91,7 @@
 typedef void (__cdecl * pfnSDL_CurrentEndThread) (unsigned code);
 #endif
 
-extern DECLSPEC SDL_Thread *SDLCALL SDL_CreateThread(int (*fn) (void *),
+extern DECLSPEC SDL_Thread *SDLCALL SDL_CreateThread(int (SDLCALL * f) (void *),
                                                      void *data,
                                                      pfnSDL_CurrentBeginThread
                                                      pfnBeginThread,
--- a/src/audio/SDL_audio.c	Sun Oct 08 08:57:28 2006 +0000
+++ b/src/audio/SDL_audio.c	Sun Oct 08 08:58:36 2006 +0000
@@ -614,7 +614,7 @@
         for (i = 0; i < SDL_arraysize(open_devices); i++) {
             if ((open_devices[i]) && (open_devices[i]->iscapture)) {
                 SDL_SetError("Audio device already open");
-                return;
+                return 0;
             }
         }
     }
@@ -629,7 +629,7 @@
         for (i = 0; i < SDL_arraysize(open_devices); i++) {
             if ((open_devices[i]) && (!open_devices[i]->iscapture)) {
                 SDL_SetError("Audio device already open");
-                return;
+                return 0;
             }
         }
     }
--- a/src/events/SDL_mouse.c	Sun Oct 08 08:57:28 2006 +0000
+++ b/src/events/SDL_mouse.c	Sun Oct 08 08:58:36 2006 +0000
@@ -165,7 +165,7 @@
     return mouse->focus;
 }
 
-static int
+static int SDLCALL
 FlushMouseMotion(void *param, SDL_Event * event)
 {
     if (event->type == SDL_MOUSEMOTION
--- a/src/video/SDL_rendercopy.h	Sun Oct 08 08:57:28 2006 +0000
+++ b/src/video/SDL_rendercopy.h	Sun Oct 08 08:58:36 2006 +0000
@@ -33,10 +33,10 @@
 #define SDL_RENDERCOPY_NEAREST          0x0100
 
 typedef struct {
-    void *src;
+    Uint8 *src;
     int src_w, src_h;
     int src_pitch;
-    void *dst;
+    Uint8 *dst;
     int dst_w, dst_h;
     int dst_pitch;
     void *aux_data;
@@ -44,7 +44,7 @@
     Uint8 r, g, b, a;
 } SDL_RenderCopyData;
 
-typedef int (*SDL_RenderCopyFunc)(SDL_RenderCopyData *data);
+typedef int (SDLCALL * SDL_RenderCopyFunc)(SDL_RenderCopyData *data);
 
 extern SDL_RenderCopyFunc SDLCALL SDL_GetRenderCopyFunc(Uint32 src_format, Uint32 dst_format, int modMode, int blendMode, int scaleMode);