summaryrefslogtreecommitdiffstats
path: root/src/audio/oal/aldlist.cpp
diff options
context:
space:
mode:
authoreray orçunus <erayorcunus@gmail.com>2020-07-22 13:56:28 +0200
committereray orçunus <erayorcunus@gmail.com>2020-07-22 17:51:28 +0200
commit1dc6fbda1fbd9a731eb20b3ef71c3dda989e511e (patch)
tree5578c27b5739341d34def86586a68f1f1129e1bb /src/audio/oal/aldlist.cpp
parentREADME 64-bit preparation (diff)
downloadre3-1dc6fbda1fbd9a731eb20b3ef71c3dda989e511e.tar
re3-1dc6fbda1fbd9a731eb20b3ef71c3dda989e511e.tar.gz
re3-1dc6fbda1fbd9a731eb20b3ef71c3dda989e511e.tar.bz2
re3-1dc6fbda1fbd9a731eb20b3ef71c3dda989e511e.tar.lz
re3-1dc6fbda1fbd9a731eb20b3ef71c3dda989e511e.tar.xz
re3-1dc6fbda1fbd9a731eb20b3ef71c3dda989e511e.tar.zst
re3-1dc6fbda1fbd9a731eb20b3ef71c3dda989e511e.zip
Diffstat (limited to 'src/audio/oal/aldlist.cpp')
-rw-r--r--src/audio/oal/aldlist.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/audio/oal/aldlist.cpp b/src/audio/oal/aldlist.cpp
index 3e86b1d7..881418c1 100644
--- a/src/audio/oal/aldlist.cpp
+++ b/src/audio/oal/aldlist.cpp
@@ -27,6 +27,7 @@
#ifndef _WIN32
#define _stricmp strcasecmp
#define _strnicmp strncasecmp
+#define _strdup strdup
#endif
#ifdef AUDIO_OAL
@@ -71,7 +72,7 @@ ALDeviceList::ALDeviceList()
if ((bNewName) && (actualDeviceName != NULL) && (strlen(actualDeviceName) > 0)) {
ALDEVICEINFO ALDeviceInfo;
ALDeviceInfo.bSelected = true;
- ALDeviceInfo.strDeviceName = actualDeviceName;
+ ALDeviceInfo.strDeviceName = _strdup(actualDeviceName);
alcGetIntegerv(device, ALC_MAJOR_VERSION, sizeof(int), &ALDeviceInfo.iMajorVersion);
alcGetIntegerv(device, ALC_MINOR_VERSION, sizeof(int), &ALDeviceInfo.iMinorVersion);