Mac OS X 10.6 & More C++03 Support (#68)

* Mac OS X 10.6 & More C++03 Support

* Fix SDL2 options.txt loading for C++03

---------

Co-authored-by: Brent Da Mage <BrentDaMage@users.noreply.github.com>
This commit is contained in:
Brent
2023-08-27 03:46:15 -05:00
committed by GitHub
parent 0c38c01c28
commit f7915a1dab
57 changed files with 1736 additions and 1534 deletions

View File

@@ -5,6 +5,8 @@
SoundSystemAL::SoundSystemAL()
{
loaded = false;
device = alcOpenDevice(NULL);
if (!device)
{
@@ -93,14 +95,14 @@ void SoundSystemAL::delete_sources()
{
if (loaded)
{
for (ALuint source : idle_sources)
for (std::vector<ALuint>::iterator source = idle_sources.begin(); source != idle_sources.end(); source++)
{
alDeleteSources(1, &source);
alDeleteSources(1, &*source);
AL_ERROR_CHECK();
}
for (ALuint source : sources)
for (std::vector<ALuint>::iterator source = sources.begin(); source != sources.end(); source++)
{
alDeleteSources(1, &source);
alDeleteSources(1, &*source);
AL_ERROR_CHECK();
}
}
@@ -113,11 +115,12 @@ void SoundSystemAL::delete_buffers()
{
if (loaded)
{
for (auto &it : buffers)
for (std::map<void *, ALuint>::iterator it = buffers.begin(); it != buffers.end(); it++)
//for (auto &it : buffers)
{
if (it.second && alIsBuffer(it.second))
if (it->second && alIsBuffer(it->second))
{
alDeleteBuffers(1, &it.second);
alDeleteBuffers(1, &it->second);
AL_ERROR_CHECK();
}
}