diff options
author | Chris Robinson <[email protected]> | 2013-11-04 10:52:03 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2013-11-04 10:52:03 -0800 |
commit | 692ab1085dd75c0ac696f3effe61bc9223181547 (patch) | |
tree | e40d6ed46e7ee47c3cc7fc56e30f62a24406c1dd | |
parent | 94aeb5f52e656e021ce626ef523fb4a29cce117f (diff) |
Only set device functions when needed
-rw-r--r-- | Alc/ALc.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -2850,7 +2850,6 @@ ALC_API ALCdevice* ALC_APIENTRY alcOpenDevice(const ALCchar *deviceName) } //Validate device - device->Funcs = &PlaybackBackend.Funcs; device->ref = 1; device->Connected = ALC_TRUE; device->Type = Playback; @@ -2879,7 +2878,10 @@ ALC_API ALCdevice* ALC_APIENTRY alcOpenDevice(const ALCchar *deviceName) device->UpdateSize = 1024; if(!PlaybackBackend.getFactory) + { + device->Funcs = &PlaybackBackend.Funcs; device->Backend = create_backend_wrapper(device, ALCbackend_Playback); + } else { ALCbackendFactory *factory = PlaybackBackend.getFactory(); @@ -3134,7 +3136,6 @@ ALC_API ALCdevice* ALC_APIENTRY alcCaptureOpenDevice(const ALCchar *deviceName, } //Validate device - device->Funcs = &CaptureBackend.Funcs; device->ref = 1; device->Connected = ALC_TRUE; device->Type = Capture; @@ -3146,7 +3147,10 @@ ALC_API ALCdevice* ALC_APIENTRY alcCaptureOpenDevice(const ALCchar *deviceName, device->DeviceName = NULL; if(!CaptureBackend.getFactory) + { + device->Funcs = &CaptureBackend.Funcs; device->Backend = create_backend_wrapper(device, ALCbackend_Capture); + } else { ALCbackendFactory *factory = CaptureBackend.getFactory(); |