aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/backends/dsound.cpp
diff options
context:
space:
mode:
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;
}