OK..
Ich habe es zumindest schon mal verkleinert.
Wegen 1 Zeile
aCovers.Delete(0);
einen else Part einzurichten war nicht gerade gut durchdacht.
Das kann ich mir dann auch sparen..
if (aCovers.count <= QuadCount) then
Delphi-Quellcode:
if CoverPath <> '' then
begin
if CoverPath <> Path then
ScanDirectory(CoverPath, 'jpg, jpeg, png', False);
if aCovers.count > -1 then
begin
LstCoverPath.Clear;
LstQuadTexture.Clear;
end;
if (aCovers.count > QuadCount) then
aCovers.Delete(0);
for I := 0 to (aCovers.count - 1) do
begin
// extract Filename
aFileName := ExtractFileName(aCovers[I]);
// extract extension
aFileName := Copy(aFileName, 1, Length(aFileName) - Length(ExtractFileExt(aFileName)));
// uppercase
aFileName := AnsiUpperCase(aFileName);
Name := ExtractFileName(GetAlbumArtisName);
if Name <> '' then
Name := Copy(Name, 1, Length(Name) - Length(ExtractFileExt(Name)));
if (aFileName = 'FOLDER') or (aFileName = Name) then
begin
if quadTexture[I] <> NoCoverTexture then
glDeleteTextures(1, @quadTexture[I]);
LoadTexture(aCovers[I], quadTexture[I], False);
LstQuadTexture.Add(IntToStr(quadTexture[I]));
LstCoverPath.Add(aCovers[I]);
end;
end; // end for i
transAlpha := 1.0;
if (LastAddCover = 0) or (LastAddCover = Round(NoCoverTexture)) then
Result := False;
if LstCoverPath.count <> 0 then
begin
InitAlbumIniPath;
SaveINI;
end;
end;
end; //end ShowCover
Aber schneller ist das trotzdem nicht.
gruss