diff options
author | Chris Robinson <[email protected]> | 2012-12-07 18:43:13 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2012-12-07 18:43:13 -0800 |
commit | eb5073a8a763ecf69f5e662a4813465a4b6f8c0b (patch) | |
tree | 8dc8d31f345c51d467200f5d6f2bbb0576509552 /OpenAL32 | |
parent | beb84bdc21bc7d0ba7a66070f14c20cb03ab92a2 (diff) |
Properly convert uint values when getting them as int64
Diffstat (limited to 'OpenAL32')
-rw-r--r-- | OpenAL32/alSource.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/OpenAL32/alSource.c b/OpenAL32/alSource.c index 480e77fe..5dbea314 100644 --- a/OpenAL32/alSource.c +++ b/OpenAL32/alSource.c @@ -1177,7 +1177,6 @@ static ALenum GetSourcei64v(const ALsource *Source, ALCcontext *Context, SrcIntP case AL_SOURCE_RELATIVE: case AL_LOOPING: - case AL_BUFFER: case AL_SOURCE_STATE: case AL_BUFFERS_QUEUED: case AL_BUFFERS_PROCESSED: @@ -1187,10 +1186,23 @@ static ALenum GetSourcei64v(const ALsource *Source, ALCcontext *Context, SrcIntP case AL_AUXILIARY_SEND_FILTER_GAINHF_AUTO: case AL_DIRECT_CHANNELS_SOFT: case AL_DISTANCE_MODEL: + if((err=GetSourceiv(Source, Context, (int)prop, ivals)) == AL_NO_ERROR) + *values = ivals[0]; + return err; + + case siBuffer: case siDirectFilter: + if((err=GetSourceiv(Source, Context, (int)prop, ivals)) == AL_NO_ERROR) + *values = ((ALuint*)ivals)[0]; + return err; + case siAuxSendFilter: if((err=GetSourceiv(Source, Context, (int)prop, ivals)) == AL_NO_ERROR) - *values = ivals[0]; + { + values[0] = ((ALuint*)ivals)[0]; + values[1] = ((ALuint*)ivals)[1]; + values[2] = ((ALuint*)ivals)[2]; + } return err; } |