Now returns an error if unable to open audio on BeOS

Fixed bugs in fullscreen/windowed mode changes, removed duplicated code.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40115
This commit is contained in:
Sam Lantinga 2001-07-20 20:07:53 +00:00
parent 890d033735
commit 841a877674
4 changed files with 53 additions and 92 deletions

View file

@ -201,8 +201,12 @@ int BE_OpenAudio(_THIS, SDL_AudioSpec *spec)
NULL, _this);
SDL_UnmaskSignals(&omask);
}
audio_obj->Start();
audio_obj->SetHasData(true);
if ( audio_obj->Start() == B_NO_ERROR ) {
audio_obj->SetHasData(true);
} else {
SDL_SetError("Unable to start Be audio");
return(-1);
}
/* We're running! */
return(1);