added code to use default images if pngs are not found
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@1974 30fe4595-0a0c-4342-8851-515496e4dcbd Former-commit-id: fdc372214e0b6bffb2117029ab8acdc1c90fc8ee Former-commit-id: 232b49121a1d013c629a6c1b370fbed4d8193866
This commit is contained in:
parent
d7cb754533
commit
48f51b63e1
1 changed files with 10 additions and 0 deletions
|
@ -72,6 +72,11 @@ rmtsGetPreviewFileName(char* previewNameBuf, unsigned previewNameBufSize)
|
|||
snprintf(previewNameBuf, previewNameBufSize, "tracks/%s/%s/%s.png", CategoryList->name,
|
||||
((tFList*)CategoryList->userData)->name, ((tFList*)CategoryList->userData)->name);
|
||||
previewNameBuf[previewNameBufSize-1] = 0; /* snprinf manual is not clear about that ... */
|
||||
if (!ulFileExists(previewNameBuf))
|
||||
{
|
||||
snprintf(previewNameBuf,previewNameBufSize,"data/img/splash-qrtrk.png");
|
||||
|
||||
}
|
||||
return previewNameBuf;
|
||||
}
|
||||
|
||||
|
@ -81,6 +86,11 @@ rmtsGetOutlineFileName(char* outlineNameBuf, unsigned outlineNameBufSize)
|
|||
snprintf(outlineNameBuf, outlineNameBufSize, "tracks/%s/%s/outline.png", CategoryList->name,
|
||||
((tFList*)CategoryList->userData)->name);
|
||||
outlineNameBuf[outlineNameBufSize-1] = 0; /* snprinf manual is not clear about that ... */
|
||||
if (!ulFileExists(outlineNameBuf))
|
||||
{
|
||||
snprintf(outlineNameBuf,outlineNameBufSize,"data/img/transparent.png");
|
||||
|
||||
}
|
||||
return outlineNameBuf;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue