Fixes and style changes from miami

This commit is contained in:
erorcun
2020-10-18 19:16:37 +03:00
parent 4c305fd48b
commit a6aa782d6d
18 changed files with 861 additions and 248 deletions

View File

@@ -321,8 +321,13 @@ cAudioManager::Get3DProviderName(uint8 id) const
{
if (!m_bIsInitialised)
return nil;
#ifdef AUDIO_OAL
id = clamp(id, 0, SampleManager.GetNum3DProvidersAvailable() - 1);
#else
// We don't want that either since it will crash the game, but skipping for now
if (id >= SampleManager.GetNum3DProvidersAvailable())
return nil;
#endif
return SampleManager.Get3DProviderName(id);
}