Another one similar.
This commit is contained in:
@@ -12,12 +12,13 @@ RageSoundDriver *RageSoundDriver::Create( const RString& sDrivers )
|
|||||||
vector<RString> DriversToTry;
|
vector<RString> DriversToTry;
|
||||||
split( sDrivers.empty()? DEFAULT_SOUND_DRIVER_LIST:sDrivers, ",", DriversToTry, true );
|
split( sDrivers.empty()? DEFAULT_SOUND_DRIVER_LIST:sDrivers, ",", DriversToTry, true );
|
||||||
|
|
||||||
FOREACH_CONST( RString, DriversToTry, Driver )
|
for (RString const &Driver : DriversToTry)
|
||||||
{
|
{
|
||||||
RageDriver *pDriver = m_pDriverList.Create( *Driver );
|
RageDriver *pDriver = m_pDriverList.Create( Driver );
|
||||||
|
char const * driverString = Driver.c_str();
|
||||||
if( pDriver == NULL )
|
if( pDriver == NULL )
|
||||||
{
|
{
|
||||||
LOG->Trace( "Unknown sound driver: %s", Driver->c_str() );
|
LOG->Trace( "Unknown sound driver: %s", driverString );
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -27,10 +28,10 @@ RageSoundDriver *RageSoundDriver::Create( const RString& sDrivers )
|
|||||||
const RString sError = pRet->Init();
|
const RString sError = pRet->Init();
|
||||||
if( sError.empty() )
|
if( sError.empty() )
|
||||||
{
|
{
|
||||||
LOG->Info( "Sound driver: %s", Driver->c_str() );
|
LOG->Info( "Sound driver: %s", driverString );
|
||||||
return pRet;
|
return pRet;
|
||||||
}
|
}
|
||||||
LOG->Info( "Couldn't load driver %s: %s", Driver->c_str(), sError.c_str() );
|
LOG->Info( "Couldn't load driver %s: %s", driverString, sError.c_str() );
|
||||||
SAFE_DELETE( pRet );
|
SAFE_DELETE( pRet );
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|||||||
Reference in New Issue
Block a user