diff options
author | whiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2007-05-20 09:40:48 +0000 |
---|---|---|
committer | whiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2007-05-20 09:40:48 +0000 |
commit | 8d45ef9b08de96a0037ac9e245a84b7730228736 (patch) | |
tree | 742cb8bc799fa4bbb524c5c76532c29ea20d2fbc /Game/Code/Screens | |
parent | 2a172c386d2c69a5a4157d8a6c0d4e64875b7011 (diff) | |
download | usdx-8d45ef9b08de96a0037ac9e245a84b7730228736.tar.gz usdx-8d45ef9b08de96a0037ac9e245a84b7730228736.tar.xz usdx-8d45ef9b08de96a0037ac9e245a84b7730228736.zip |
An effort to make a workaround for the many Crashes when a Video File ist corrupted.
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@225 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'Game/Code/Screens')
-rw-r--r-- | Game/Code/Screens/UScreenSing.pas | 32 |
1 files changed, 30 insertions, 2 deletions
diff --git a/Game/Code/Screens/UScreenSing.pas b/Game/Code/Screens/UScreenSing.pas index cdce5984..3899a4ed 100644 --- a/Game/Code/Screens/UScreenSing.pas +++ b/Game/Code/Screens/UScreenSing.pas @@ -730,7 +730,23 @@ end; procedure TScreenSing.onShowFinish;
begin
// play movie (II)
- if AktSong.VideoLoaded then PlaySmpeg;
+
+ if AktSong.VideoLoaded then
+ begin
+ try
+ PlaySmpeg;
+ except
+ //If an Error occurs Reading Video: prevent Video from being Drawn again and Close Video
+ AktSong.VideoLoaded := False;
+ Log.LogError('Error drawing Video, Video has been disabled for this Song/Session.');
+ Log.LogError('Corrupted File: ' + AktSong.Video);
+ try
+ CloseSmpeg;
+ except
+
+ end;
+ end;
+ end;
// play music (II)
Music.Play;
@@ -1039,7 +1055,19 @@ begin SingDrawBackground;
// update and draw movie
if ShowFinish and AktSong.VideoLoaded then begin
- UpdateSmpeg; // this only draws
+ try
+ UpdateSmpeg; // this only draws
+ except
+ //If an Error occurs drawing: prevent Video from being Drawn again and Close Video
+ AktSong.VideoLoaded := False;
+ log.LogError('Error drawing Video, Video has been disabled for this Song/Session.');
+ Log.LogError('Corrupted File: ' + AktSong.Video);
+ try
+ CloseSmpeg;
+ except
+
+ end;
+ end;
end;
// draw static menu (FG)
|