Skip to content

Commit

Permalink
gamelist.pl: better guess for sourcefile
Browse files Browse the repository at this point in the history
  • Loading branch information
barbudreadmon committed Nov 11, 2023
1 parent ee16a01 commit 37e23e3
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/dep/scripts/gamelist.pl
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,12 @@
$Drivers{$name}[8] = "";
}

my $sourcefile = $filename;
$sourcefile =~ s/..\/..\/burn\/drv\///; # libretro only ?
$sourcefile =~ s/src\/burn\/drv\///; # all other builds ?
$Drivers{$name}[9] = $sourcefile; # Filename
my @parts = split /\//, $filename;
my $size_of_parts = @parts;
my $sourcefile = "$parts[$size_of_parts-2]/$parts[$size_of_parts-1]";
# we still want to remove burn/ from burn/d_parent.cpp
$sourcefile =~ s/drv\///;
$Drivers{$name}[9] = $sourcefile; # Filename

# Convert NULL/null/0 to empty string or remove quotes
foreach $line ( @{$Drivers{$name}} ) {
Expand Down

0 comments on commit 37e23e3

Please sign in to comment.