diff options
Diffstat (limited to 'Alc/backends/winmm.cpp')
-rw-r--r-- | Alc/backends/winmm.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Alc/backends/winmm.cpp b/Alc/backends/winmm.cpp index 6e43ff79..0c625e27 100644 --- a/Alc/backends/winmm.cpp +++ b/Alc/backends/winmm.cpp @@ -286,7 +286,8 @@ retry_open: return ALC_INVALID_VALUE; } - alstr_copy_cstr(&device->DeviceName, PlaybackDevices[DeviceID].c_str()); + al_free(device->DeviceName); + device->DeviceName = alstrdup(PlaybackDevices[DeviceID].c_str()); return ALC_NO_ERROR; } @@ -606,7 +607,8 @@ static ALCenum ALCwinmmCapture_open(ALCwinmmCapture *self, const ALCchar *device self->WaveBuffer[i].dwBufferLength = self->WaveBuffer[i-1].dwBufferLength; } - alstr_copy_cstr(&device->DeviceName, CaptureDevices[DeviceID].c_str()); + al_free(device->DeviceName); + device->DeviceName = alstrdup(CaptureDevices[DeviceID].c_str()); return ALC_NO_ERROR; } |