autodetect an ID smarter
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3486 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
6c0e419dd0
commit
e86218b859
1 changed files with 9 additions and 2 deletions
|
@ -406,8 +406,15 @@ int main(int argc, char **argv)
|
|||
|
||||
if (!id)
|
||||
{
|
||||
id = strdup(bmp_filename);
|
||||
for (i = 0; id[i]; i++) if (id[i] == '.') id[i] = '\0';
|
||||
char *ptr=strrchr(bmp_filename, '/');
|
||||
if(ptr)
|
||||
ptr++;
|
||||
else
|
||||
ptr = bmp_filename;
|
||||
id = strdup(ptr);
|
||||
for (i = 0; id[i]; i++)
|
||||
if (id[i] == '.')
|
||||
id[i] = '\0';
|
||||
}
|
||||
|
||||
if (read_bmp_file(bmp_filename, &width, &height, &bitmap))
|
||||
|
|
Loading…
Reference in a new issue