File selector now omits extension for display.

This commit is contained in:
Stefan `Sec` Zehl 2011-08-04 13:52:36 +02:00
parent d68b51f230
commit 9b115fea4c
1 changed files with 10 additions and 0 deletions

View File

@ -75,7 +75,17 @@ int selectFile(char *filename, char *extension)
lcdPrint("*");
else
lcdPrint(" ");
lcdSetCrsrX(14);
int dot=-1;
for(int j=0;files[j];j++)
if(files[i][j]=='.'){
files[i][j]=0;
dot=j;
break;
};
lcdPrintln(files[i]);
if(dot>0)
files[i][dot]='.';
}
lcdRefresh();
key=getInputWait();