aliases.txt separator and location changed
This commit is contained in:
parent
a0e3ef28ad
commit
77d60b95b4
4 changed files with 29 additions and 38 deletions
18
aliases.txt
18
aliases.txt
|
|
@ -1,18 +0,0 @@
|
|||
2020bb:2020 Super Baseball
|
||||
alpham2:Alpha Mission II
|
||||
mslug:Metal Slug - Super Vehicle-001
|
||||
neogeo:Neo-Geo MV-6F
|
||||
mslug2:Metal Slug 2 - Super Vehicle-001/II
|
||||
mslug2t:Metal Slug 2 Turbo
|
||||
mslug3h:Metal Slug 3
|
||||
mslug3:Metal Slug 3
|
||||
mslug3a:Metal Slug 3
|
||||
mslug4h:Metal Slug 4
|
||||
mslug4:Metal Slug 4
|
||||
mslug5b:Metal Slug 5
|
||||
mslug5:Metal Slug 5
|
||||
mslug5h:Metal Slug 5
|
||||
mslug6:Metal Slug 6
|
||||
awbios:Atomiswave Bios
|
||||
mslug3b6:Metal Slug 6
|
||||
mslugx:Metal Slug X - Super Vehicle-001
|
||||
|
|
@ -1,3 +1,11 @@
|
|||
#Avoid complex names
|
||||
#Separator is '~'. Do not include that in the alias
|
||||
#Lines starting with '#' are comments and are not count
|
||||
#Keep below 1000 including comments
|
||||
#
|
||||
#Works for any list (collections, favorites, consoles, etc)
|
||||
#Real filename will be shown on game's menu. This only affects main menu listing.
|
||||
#
|
||||
#NEOGEO~##
|
||||
2020bb~2020 Super Baseball
|
||||
sonicwi2~Aero Fighters 2
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@
|
|||
#define BATTERY_PATH SDCARD_PATH "/battery.txt"
|
||||
#define SCREENSHOTS_PATH SDCARD_PATH "/Screenshots"
|
||||
#define ADB_FLAG_PATH SDCARD_PATH "/enableADB"
|
||||
#define ALIASES_PATH SDCARD_PATH "/aliases.txt"
|
||||
#define ALIASES_PATH SDCARD_PATH "/Roms/aliases.txt"
|
||||
|
||||
#define LAST_PATH "/tmp/last.txt" // transient
|
||||
#define CHANGE_DISC_PATH "/tmp/change_disc.txt"
|
||||
|
|
|
|||
|
|
@ -1304,17 +1304,18 @@ int main (int argc, char *argv[]) {
|
|||
|
||||
FILE *aliases = fopen(ALIASES_PATH, "r");
|
||||
int aIndex = 0;
|
||||
char* original[50];
|
||||
char* alias[50];
|
||||
char* original[1000];
|
||||
char* alias[1000];
|
||||
char line[75];
|
||||
|
||||
if (aliases) {
|
||||
while(fgets(line, sizeof line, aliases)!=NULL) {
|
||||
if (line[0] != '\0' && line[0] != '#') {
|
||||
original[aIndex] = malloc(sizeof(line));
|
||||
alias[aIndex] = malloc(sizeof(line));
|
||||
|
||||
int set_alias = 0;
|
||||
char* split = strtok(line, ":");
|
||||
char* split = strtok(line, "~");
|
||||
|
||||
while(split) {
|
||||
if (!set_alias) {
|
||||
|
|
@ -1323,11 +1324,11 @@ int main (int argc, char *argv[]) {
|
|||
} else {
|
||||
strcpy(alias[aIndex], split);
|
||||
}
|
||||
split = strtok(NULL, ":");
|
||||
split = strtok(NULL, "~");
|
||||
}
|
||||
|
||||
aIndex++;
|
||||
}
|
||||
}
|
||||
|
||||
fclose(aliases);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue