diff options
| author | nakeee <nakeee@gmail.com> | 2009-03-30 17:24:55 +0000 |
|---|---|---|
| committer | nakeee <nakeee@gmail.com> | 2009-03-30 17:24:55 +0000 |
| commit | 58a78cb2b59aa7a2858467b0c29f75962ab1979c (patch) | |
| tree | d1e3fc1472cda8c2ba3d3c0cb7847cb777dd2e55 /Source/Core/AudioCommon/Src/aldlist.cpp | |
| parent | 6b2b1a34ee079f1c3fb8d3ac0d1d41dfbe9a3866 (diff) | |
Make openal works on linux
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2805 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/AudioCommon/Src/aldlist.cpp')
| -rw-r--r-- | Source/Core/AudioCommon/Src/aldlist.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/Source/Core/AudioCommon/Src/aldlist.cpp b/Source/Core/AudioCommon/Src/aldlist.cpp index 7c6b0eeec9..46e910dc59 100644 --- a/Source/Core/AudioCommon/Src/aldlist.cpp +++ b/Source/Core/AudioCommon/Src/aldlist.cpp @@ -22,6 +22,7 @@ * POSSIBILITY OF SUCH DAMAGE.
*/
+#include "Common.h"
#include "aldlist.h"
#include "../../../../Externals/OpenAL/include/al.h"
#include "../../../../Externals/OpenAL/include/alc.h"
@@ -51,7 +52,7 @@ ALDeviceList::ALDeviceList() defaultDeviceName = (char *)alcGetString(NULL, ALC_DEFAULT_DEVICE_SPECIFIER);
index = 0;
// go through device list (each device terminated with a single NULL, list terminated with double NULL)
- while (*devices != NULL) {
+ while (devices != NULL) {
if (strcmp(defaultDeviceName, devices) == 0) {
defaultDeviceIndex = index;
}
@@ -191,7 +192,7 @@ bool ALDeviceList::IsExtensionSupported(s32 index, char *szExtName) if (index < GetNumDevices()) {
for (u32 i = 0; i < vDeviceInfo[index].pvstrExtensions->size(); i++) {
- if (!_stricmp(vDeviceInfo[index].pvstrExtensions->at(i).c_str(), szExtName)) {
+ if (!strcasecmp(vDeviceInfo[index].pvstrExtensions->at(i).c_str(), szExtName)) {
bReturn = true;
break;
}
@@ -214,7 +215,7 @@ s32 ALDeviceList::GetDefaultDevice() */
void ALDeviceList::FilterDevicesMinVer(s32 major, s32 minor)
{
- s32 dMajor, dMinor;
+ s32 dMajor = 0, dMinor = 0;
for (u32 i = 0; i < vDeviceInfo.size(); i++) {
GetDeviceVersion(i, &dMajor, &dMinor);
if ((dMajor < major) || ((dMajor == major) && (dMinor < minor))) {
@@ -228,7 +229,7 @@ void ALDeviceList::FilterDevicesMinVer(s32 major, s32 minor) */
void ALDeviceList::FilterDevicesMaxVer(s32 major, s32 minor)
{
- s32 dMajor, dMinor;
+ s32 dMajor = 0, dMinor = 0;
for (u32 i = 0; i < vDeviceInfo.size(); i++) {
GetDeviceVersion(i, &dMajor, &dMinor);
if ((dMajor > major) || ((dMajor == major) && (dMinor > minor))) {
@@ -247,7 +248,7 @@ void ALDeviceList::FilterDevicesExtension(char *szExtName) for (u32 i = 0; i < vDeviceInfo.size(); i++) {
bFound = false;
for (u32 j = 0; j < vDeviceInfo[i].pvstrExtensions->size(); j++) {
- if (!_stricmp(vDeviceInfo[i].pvstrExtensions->at(j).c_str(), szExtName)) {
+ if (!strcasecmp(vDeviceInfo[i].pvstrExtensions->at(j).c_str(), szExtName)) {
bFound = true;
break;
}
@@ -330,4 +331,4 @@ u32 ALDeviceList::GetMaxNumSources() }
return iSourceCount;
-}
\ No newline at end of file +}
|
