From 85c7cf68848e3640238cfaa631305ae87e59cf66 Mon Sep 17 00:00:00 2001 From: whiteshark0 Date: Mon, 9 Nov 2009 21:00:17 +0000 Subject: fixed folders=on bug for the moment git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1941 b956fd51-792f-4845-bead-9b4dfca2ff2c --- src/base/USong.pas | 8 ++++++++ src/screens/UScreenSong.pas | 13 ++++++++++--- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/src/base/USong.pas b/src/base/USong.pas index d2043a93..a6d46c4c 100644 --- a/src/base/USong.pas +++ b/src/base/USong.pas @@ -176,6 +176,14 @@ const constructor TSong.Create(); begin inherited; + + //dirty fix to fix folders=on + Self.Path := PATH_NONE(); + Self.FileName := PATH_NONE(); + Self.Cover := PATH_NONE(); + Self.Mp3 := PATH_NONE(); + Self.Background:= PATH_NONE(); + Self.Video := PATH_NONE(); end; // This may be changed, when we rewrite song select code. diff --git a/src/screens/UScreenSong.pas b/src/screens/UScreenSong.pas index 5fa6de39..9a534c51 100644 --- a/src/screens/UScreenSong.pas +++ b/src/screens/UScreenSong.pas @@ -868,10 +868,17 @@ begin Song := CatSongs.Song[I]; - // if cover-image is not found then show 'no cover' - CoverFile := Song.Path.Append(Song.Cover); - if (not CoverFile.IsFile()) then + if not Song.Main then + begin // to-do : load category covers again... + // just a workaround to fic folders=on for the moment... + // if cover-image is not found then show 'no cover' + CoverFile := Song.Path.Append(Song.Cover); + if (not CoverFile.IsFile()) then + Song.Cover := PATH_NONE; + end + else Song.Cover := PATH_NONE; + if (Song.Cover.IsUnset) then CoverFile := Skin.GetTextureFileName('SongCover'); -- cgit v1.2.3