aboutsummaryrefslogtreecommitdiffstats
path: root/unicode/src/menu/UMenuBackgroundVideo.pas
diff options
context:
space:
mode:
authortobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2009-07-23 18:09:11 +0000
committertobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2009-07-23 18:09:11 +0000
commit21c1082f916cc9a4d7be625c132e02b1fc1d8012 (patch)
treecf3c705058db9839ba80cebfaf0fe69086fa38f2 /unicode/src/menu/UMenuBackgroundVideo.pas
parent446eec893b7915d80a4504d40bbfc6f77cafa550 (diff)
downloadusdx-21c1082f916cc9a4d7be625c132e02b1fc1d8012.tar.gz
usdx-21c1082f916cc9a4d7be625c132e02b1fc1d8012.tar.xz
usdx-21c1082f916cc9a4d7be625c132e02b1fc1d8012.zip
- IPath integration
- BASS is now unicode compatible git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/experimental@1875 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to '')
-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;