aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/backends/dsound.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-11-15 06:23:01 -0800
committerChris Robinson <[email protected]>2018-11-15 06:23:01 -0800
commit7b3a2085aac8eac47f9968f331d3991167793e85 (patch)
tree5566b15f7a90fe8e0fb2b280c4f8b83c80247f4f /Alc/backends/dsound.cpp
parentab9f8162b84870161948ddd27d29483206dd4e57 (diff)
Use a regular char* for the device's name
Diffstat (limited to 'Alc/backends/dsound.cpp')
-rw-r--r--Alc/backends/dsound.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/Alc/backends/dsound.cpp b/Alc/backends/dsound.cpp
index 50e956ea..478bdf9a 100644
--- a/Alc/backends/dsound.cpp
+++ b/Alc/backends/dsound.cpp
@@ -396,7 +396,8 @@ static ALCenum ALCdsoundPlayback_open(ALCdsoundPlayback *self, const ALCchar *de
return ALC_INVALID_VALUE;
}
- alstr_copy_cstr(&device->DeviceName, deviceName);
+ al_free(device->DeviceName);
+ device->DeviceName = alstrdup(deviceName);
return ALC_NO_ERROR;
}
@@ -862,7 +863,8 @@ static ALCenum ALCdsoundCapture_open(ALCdsoundCapture *self, const ALCchar *devi
self->BufferBytes = DSCBDescription.dwBufferBytes;
SetDefaultWFXChannelOrder(device);
- alstr_copy_cstr(&device->DeviceName, deviceName);
+ al_free(device->DeviceName);
+ device->DeviceName = alstrdup(deviceName);
return ALC_NO_ERROR;
}