aboutsummaryrefslogtreecommitdiffstats
path: root/unicode/src/menu/UMenuBackgroundVideo.pas
diff options
context:
space:
mode:
Diffstat (limited to 'unicode/src/menu/UMenuBackgroundVideo.pas')
-rw-r--r--unicode/src/menu/UMenuBackgroundVideo.pas11
1 files changed, 5 insertions, 6 deletions
diff --git a/unicode/src/menu/UMenuBackgroundVideo.pas b/unicode/src/menu/UMenuBackgroundVideo.pas
index d1ce0f09..0e0a2bff 100644
--- a/unicode/src/menu/UMenuBackgroundVideo.pas
+++ b/unicode/src/menu/UMenuBackgroundVideo.pas
@@ -36,7 +36,8 @@ interface
uses
UThemes,
UMenuBackground,
- UVideo;
+ UVideo,
+ UPath;
//TMenuBackgroundColor - Background Color
//--------
@@ -82,7 +83,7 @@ type
type }
TMenuBackgroundVideo = class (TMenuBackground)
private
- fFilename: string;
+ fFilename: IPath;
public
constructor Create(const ThemedSettings: TThemeBackground); override;
procedure OnShow; override;
@@ -115,15 +116,13 @@ begin
raise EMenuBackgroundError.Create('TMenuBackgroundVideo: No video filename present');
fFileName := Skin.GetTextureFileName(ThemedSettings.Tex);
- fFileName := AdaptFilePaths( fFileName );
-
- if fileexists(fFilename) AND VideoPlayback.Open( fFileName ) then
+ if fFilename.IsFile and VideoPlayback.Open(fFileName) then
begin
VideoBGTimer.SetTime(0);
VideoPlayback.Play;
end
else
- raise EMenuBackgroundError.Create('TMenuBackgroundVideo: Can''t load background video: ' + fFilename);
+ raise EMenuBackgroundError.Create('TMenuBackgroundVideo: Can''t load background video: ' + fFilename.ToNative);
end;
destructor TMenuBackgroundVideo.Destroy;