Add movie error checking.
This commit is contained in:
@@ -24,6 +24,7 @@ enum {
|
|||||||
};
|
};
|
||||||
|
|
||||||
OSStatus HandleException(ExceptionInformation *theException);
|
OSStatus HandleException(ExceptionInformation *theException);
|
||||||
|
void HandleQTMovieError(OSErr err, long refcon);
|
||||||
|
|
||||||
ArchHooks_darwin::ArchHooks_darwin()
|
ArchHooks_darwin::ArchHooks_darwin()
|
||||||
{
|
{
|
||||||
@@ -44,6 +45,8 @@ ArchHooks_darwin::ArchHooks_darwin()
|
|||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
InstallExceptionHandler(HandleException);
|
InstallExceptionHandler(HandleException);
|
||||||
|
ASSERT(GetMoviesError() == noErr);
|
||||||
|
SetMoviesErrorProc(HandleQTMovieError, 0);
|
||||||
err = EnterMovies();
|
err = EnterMovies();
|
||||||
ASSERT(err == noErr);
|
ASSERT(err == noErr);
|
||||||
}
|
}
|
||||||
@@ -311,3 +314,11 @@ inline void ArchHooks_darwin::Update(float delta)
|
|||||||
if (__builtin_expect(err, noErr))
|
if (__builtin_expect(err, noErr))
|
||||||
RageException::Throw("MoviesTask failed with error: %d", err);
|
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