Mercurial > sdl-ios-xcode
diff src/audio/windib/SDL_dibaudio.c @ 1456:84de7511f79f
Fixed a bunch of 64-bit compatibility problems
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Wed, 01 Mar 2006 09:43:47 +0000 |
parents | bb6839704ed6 |
children | 782fd950bd46 c121d94672cb a1b03ba2fcd0 |
line wrap: on
line diff
--- a/src/audio/windib/SDL_dibaudio.c Mon Feb 27 22:14:40 2006 +0000 +++ b/src/audio/windib/SDL_dibaudio.c Wed Mar 01 09:43:47 2006 +0000 @@ -99,7 +99,7 @@ /* The Win32 callback for filling the WAVE device */ -static void CALLBACK FillSound(HWAVEOUT hwo, UINT uMsg, DWORD dwInstance, +static void CALLBACK FillSound(HWAVEOUT hwo, UINT uMsg, DWORD_PTR dwInstance, DWORD dwParam1, DWORD dwParam2) { SDL_AudioDevice *this = (SDL_AudioDevice *)dwInstance; @@ -118,7 +118,7 @@ static void SetMMerror(char *function, MMRESULT code) { - int len; + size_t len; char errbuf[MAXERRORLENGTH]; #ifdef _WIN32_WCE wchar_t werrbuf[MAXERRORLENGTH]; @@ -132,7 +132,7 @@ waveOutGetErrorText(code, werrbuf, MAXERRORLENGTH-len); WideCharToMultiByte(CP_ACP,0,werrbuf,-1,errbuf+len,MAXERRORLENGTH-len,NULL,NULL); #else - waveOutGetErrorText(code, errbuf+len, MAXERRORLENGTH-len); + waveOutGetErrorText(code, errbuf+len, (UINT)(MAXERRORLENGTH-len)); #endif SDL_SetError("%s",errbuf); @@ -266,7 +266,7 @@ /* Open the audio device */ result = waveOutOpen(&sound, WAVE_MAPPER, &waveformat, - (DWORD)FillSound, (DWORD)this, CALLBACK_FUNCTION); + (DWORD_PTR)FillSound, (DWORD_PTR)this, CALLBACK_FUNCTION); if ( result != MMSYSERR_NOERROR ) { SetMMerror("waveOutOpen()", result); return(-1);