new cfg file system

git-svn-id: file:///home/notaz/opt/svn/PicoDrive/platform@390 be3aeb3a-fb24-0410-a615-afba39da0efa
This commit is contained in:
notaz 2008-03-20 21:30:17 +00:00
parent c09d5a010d
commit 0ae25549b5
11 changed files with 293 additions and 253 deletions

View file

@ -322,5 +322,25 @@ int me_process(menu_entry *entries, int count, menu_id id, int is_next)
}
}
const char *me_region_name(unsigned int code, int auto_order)
{
static const char *names[] = { "Auto", " Japan NTSC", " Japan PAL", " USA", " Europe" };
static const char *names_short[] = { "", " JP", " JP", " US", " EU" };
int u, i = 0;
if (code) {
code <<= 1;
while((code >>= 1)) i++;
if (i > 4) return "unknown";
return names[i];
} else {
static char name[24];
strcpy(name, "Auto:");
for (u = 0; u < 3; u++) {
i = 0; code = ((auto_order >> u*4) & 0xf) << 1;
while((code >>= 1)) i++;
strcat(name, names_short[i]);
}
return name;
}
}