summaryrefslogtreecommitdiffstatshomepage
path: root/src/tools
diff options
context:
space:
mode:
author R. Belmont <rb6502@users.noreply.github.com>2014-04-28 01:57:31 +0000
committer R. Belmont <rb6502@users.noreply.github.com>2014-04-28 01:57:31 +0000
commitbd320e789d9488ec337c04ad7c4824254c44517c (patch)
tree31dc4c2b5818c9f53882cd764f9e95004404dd26 /src/tools
parent8db4bddf33af3d4c22e57a7d00fd36dcbf6e2446 (diff)
CHD cleanups: [MetalliC]
- Double quote filenames with spaces when writing .gdi files - Give audio files .raw extension when writing .gdi files - cdrom_read_subcode() now returns false if the image doesn't contain subcodes
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/chdman.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/tools/chdman.c b/src/tools/chdman.c
index 1fe97a68f3c..d85b40a85cb 100644
--- a/src/tools/chdman.c
+++ b/src/tools/chdman.c
@@ -1226,7 +1226,8 @@ void output_track_metadata(int mode, core_file *file, int tracknum, const cdrom_
size = 2352;
break;
}
- core_fprintf(file, "%d %d %d %d %s %" I64FMT "d\n", tracknum+1, frameoffs, mode, size, filename, discoffs);
+ bool needquote = strchr(filename, ' ') != NULL;
+ core_fprintf(file, "%d %d %d %d %s%s%s %" I64FMT "d\n", tracknum+1, frameoffs, mode, size, needquote?"\"":"", filename, needquote?"\"":"", discoffs);
}
else if (mode == MODE_CUEBIN)
{
@@ -2353,7 +2354,10 @@ static void do_extract_cd(parameters_t &params)
char temp[8];
sprintf(temp, "%02d", tracknum+1);
trackbin_name.cat(temp);
- trackbin_name.cat(".bin");
+ if (toc->tracks[tracknum].trktype == CD_TRACK_AUDIO)
+ trackbin_name.cat(".raw");
+ else
+ trackbin_name.cat(".bin");
if (output_bin_file)
{