Add movie error checking.
This commit is contained in:
@@ -24,6 +24,7 @@ enum {
|
||||
};
|
||||
|
||||
OSStatus HandleException(ExceptionInformation *theException);
|
||||
void HandleQTMovieError(OSErr err, long refcon);
|
||||
|
||||
ArchHooks_darwin::ArchHooks_darwin()
|
||||
{
|
||||
@@ -44,6 +45,8 @@ ArchHooks_darwin::ArchHooks_darwin()
|
||||
exit(0);
|
||||
}
|
||||
InstallExceptionHandler(HandleException);
|
||||
ASSERT(GetMoviesError() == noErr);
|
||||
SetMoviesErrorProc(HandleQTMovieError, 0);
|
||||
err = EnterMovies();
|
||||
ASSERT(err == noErr);
|
||||
}
|
||||
@@ -311,3 +314,11 @@ inline void ArchHooks_darwin::Update(float delta)
|
||||
if (__builtin_expect(err, noErr))
|
||||
RageException::Throw("MoviesTask failed with error: %d", err);
|
||||
}
|
||||
|
||||
void HandleQTMovieError(OSErr err, long refcon)
|
||||
{
|
||||
LOG->Warn("A movie error occured. Error number %d.", err);
|
||||
#if defined(DEBUG)
|
||||
ASSERT(0);
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user