diff options
author | brunzelchen <brunzelchen@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2009-12-06 22:14:34 +0000 |
---|---|---|
committer | brunzelchen <brunzelchen@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2009-12-06 22:14:34 +0000 |
commit | c5c8fd69256016ebd39f2de51cad9e35974bc703 (patch) | |
tree | b313b660b436ddf710972b52366715f420f10c9a /src/screens | |
parent | 839b3eaf9e64425f5400d7dda220507fdb75f939 (diff) | |
download | usdx-c5c8fd69256016ebd39f2de51cad9e35974bc703.tar.gz usdx-c5c8fd69256016ebd39f2de51cad9e35974bc703.tar.xz usdx-c5c8fd69256016ebd39f2de51cad9e35974bc703.zip |
fix performance problem on scroll
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1999 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'src/screens')
-rw-r--r-- | src/screens/UScreenSong.pas | 44 | ||||
-rw-r--r-- | src/screens/UScreenSongJumpto.pas | 2 |
2 files changed, 24 insertions, 22 deletions
diff --git a/src/screens/UScreenSong.pas b/src/screens/UScreenSong.pas index 7cfb0b0a..c2afbfe1 100644 --- a/src/screens/UScreenSong.pas +++ b/src/screens/UScreenSong.pas @@ -128,8 +128,8 @@ type procedure GenerateThumbnails(); procedure OnShow; override; procedure OnHide; override; - procedure SelectNext; - procedure SelectPrev; + procedure SelectNext(UnloadCover: boolean); + procedure SelectPrev(UnloadCover: boolean); procedure SkipTo(Target: cardinal); procedure FixSelected; //Show Wrong Song when Tabs on Fix procedure FixSelected2; //Show Wrong Song when Tabs on Fix @@ -434,7 +434,7 @@ begin CatSongs.ShowCategoryList; CatSongs.ClickCategoryButton(I); - SelectNext; + SelectNext(true); FixSelected; break; end; @@ -462,7 +462,7 @@ begin ShowCatTL (I); CatSongs.ClickCategoryButton(I); - SelectNext; + SelectNext(true); // Fix: not existing song selected: //if (I + 1 = I2) then @@ -516,9 +516,9 @@ begin HideCatTL; //Show Wrong Song when Tabs on Fix - SelectNext; + SelectNext(true); FixSelected; - //SelectPrev; + //SelectPrev(true); //CatSongs.Song[0].Visible := false; end else @@ -535,7 +535,7 @@ begin Interaction := 0; //Show Wrong Song when Tabs on Fix - SelectNext; + SelectNext(true); FixSelected; ChangeMusic; @@ -575,7 +575,7 @@ begin // SetScroll4; //Show Wrong Song when Tabs on Fix - SelectNext; + SelectNext(true); FixSelected; //Play Music: @@ -635,7 +635,7 @@ begin ShowCatTL (Interaction); CatSongs.ClickCategoryButton(Interaction); - SelectNext; + SelectNext(true); FixSelected; //Play Music: @@ -679,7 +679,7 @@ begin ShowCatTL (I); CatSongs.ClickCategoryButton(I); - SelectNext; + SelectNext(true); FixSelected; //Play Music: @@ -696,7 +696,7 @@ begin if (Songs.SongList.Count > 0) and (Mode = smNormal) then begin AudioPlayback.PlaySound(SoundLib.Change); - SelectNext; + SelectNext(true); //InteractNext; //SongTarget := Interaction; ChangeMusic; @@ -709,7 +709,7 @@ begin if (Songs.SongList.Count > 0)and (Mode = smNormal) then begin AudioPlayback.PlaySound(SoundLib.Change); - SelectPrev; + SelectPrev(true); ChangeMusic; SetScroll4; end; @@ -1532,7 +1532,7 @@ begin //If Playlist Shown -> Select Next automatically if (CatSongs.CatNumShow = -3) then begin - SelectNext; + SelectNext(true); ChangeMusic; end; end @@ -1662,7 +1662,7 @@ begin Result := true; end; -procedure TScreenSong.SelectNext; +procedure TScreenSong.SelectNext(UnloadCover: boolean); var Skip: integer; VS: integer; @@ -1671,7 +1671,8 @@ begin if VS > 0 then begin - UnLoadDetailedCover; + if UnloadCover then //that should fix the performance problem on scrolling + UnLoadDetailedCover; Skip := 1; @@ -1697,7 +1698,7 @@ begin //Button[Interaction].Texture := Texture.GetTexture(Button[Interaction].Texture.Name, TEXTURE_TYPE_PLAIN, false); end; -procedure TScreenSong.SelectPrev; +procedure TScreenSong.SelectPrev(UnloadCover: boolean); var Skip: integer; VS: integer; @@ -1706,7 +1707,8 @@ begin if VS > 0 then begin - UnLoadDetailedCover; + if UnloadCover then + UnLoadDetailedCover; //that should fix the performance problem on scrolling Skip := 1; @@ -1811,7 +1813,7 @@ begin SongTarget := 0; for i := 1 to Target+1 do - SelectNext; + SelectNext(false); FixSelected2; end; @@ -1845,7 +1847,7 @@ begin ShowCatTL(I); CatSongs.ClickCategoryButton(I); - SelectNext; + SelectNext(true); // choose song SkipTo(I2 - I); @@ -1860,7 +1862,7 @@ begin CatSongs.ClickCategoryButton(PlaylistMan.CurPlayList); ShowCatTL(PlaylistMan.CurPlayList); - SelectNext; + SelectNext(true); FixSelected2; SkipTo(Random(CatSongs.VisibleSongs)); @@ -2054,7 +2056,7 @@ begin CatSongs.Refresh; CatSongs.ShowCategoryList; Interaction := 0; - SelectNext; + SelectNext(true); FixSelected; } end; diff --git a/src/screens/UScreenSongJumpto.pas b/src/screens/UScreenSongJumpto.pas index 3a199576..7f82bbec 100644 --- a/src/screens/UScreenSongJumpto.pas +++ b/src/screens/UScreenSongJumpto.pas @@ -229,7 +229,7 @@ begin //Fix SongSelection ScreenSong.Interaction := high(CatSongs.Song); - ScreenSong.SelectNext; + ScreenSong.SelectNext(true); ScreenSong.FixSelected; //Play Correct Music |