diff options
author | Sergeanur <s.anureev@yandex.ua> | 2021-06-20 20:28:53 +0200 |
---|---|---|
committer | Sergeanur <s.anureev@yandex.ua> | 2021-06-24 20:32:44 +0200 |
commit | 5c1af537af94fdc1af9881d0d8e5c32f46b89e56 (patch) | |
tree | 538951e8b3edb546e8eaf3592b4271cea67f2f8f /src/audio/oal/aldlist.h | |
parent | Fix police scanner on high fps (diff) | |
download | re3-5c1af537af94fdc1af9881d0d8e5c32f46b89e56.tar re3-5c1af537af94fdc1af9881d0d8e5c32f46b89e56.tar.gz re3-5c1af537af94fdc1af9881d0d8e5c32f46b89e56.tar.bz2 re3-5c1af537af94fdc1af9881d0d8e5c32f46b89e56.tar.lz re3-5c1af537af94fdc1af9881d0d8e5c32f46b89e56.tar.xz re3-5c1af537af94fdc1af9881d0d8e5c32f46b89e56.tar.zst re3-5c1af537af94fdc1af9881d0d8e5c32f46b89e56.zip |
Diffstat (limited to '')
-rw-r--r-- | src/audio/oal/aldlist.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/audio/oal/aldlist.h b/src/audio/oal/aldlist.h index 417bd314..3ed12d84 100644 --- a/src/audio/oal/aldlist.h +++ b/src/audio/oal/aldlist.h @@ -21,7 +21,7 @@ enum }; struct ALDEVICEINFO { - const char *strDeviceName; + char *strDeviceName; int iMajorVersion; int iMinorVersion; unsigned int uiSourceCount; @@ -33,6 +33,19 @@ struct ALDEVICEINFO { strDeviceName = NULL; Extensions = 0; } + + ~ALDEVICEINFO() + { + delete[] strDeviceName; + strDeviceName = NULL; + } + + void SetName(const char *name) + { + if(strDeviceName) delete[] strDeviceName; + strDeviceName = new char[strlen(name) + 1]; + strcpy(strDeviceName, name); + } }; typedef ALDEVICEINFO *LPALDEVICEINFO; |