autodetect an ID smarter

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3486 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Daniel Stenberg 2003-03-19 21:42:50 +00:00
parent 6c0e419dd0
commit e86218b859

View file

@ -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))