diff options
| author | 2015-12-26 17:49:12 +0200 | |
|---|---|---|
| committer | 2015-12-26 17:49:12 +0200 | |
| commit | 7ae681b010802788810714fa21ef29fe29b32283 (patch) | |
| tree | e45e329492ebee8e46972b3deb289228de41cc39 /src | |
| parent | e756a66b14d60a6ced720da68c20622e3477acf9 (diff) | |
chdman info verbose metadata output (nw)
Diffstat (limited to 'src')
| -rw-r--r-- | src/tools/chdman.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/tools/chdman.cpp b/src/tools/chdman.cpp index 88a629b97dd..7d4472b1d61 100644 --- a/src/tools/chdman.cpp +++ b/src/tools/chdman.cpp @@ -1342,6 +1342,7 @@ void output_track_metadata(int mode, core_file *file, int tracknum, const cdrom_ static void do_info(parameters_t ¶ms) { + bool verbose = params.find(OPTION_VERBOSE) != params.end(); // parse out input files chd_file input_parent_chd; chd_file input_chd; @@ -1414,15 +1415,17 @@ static void do_info(parameters_t ¶ms) printf("Metadata: Tag=%08x Index=%d Length=%d bytes\n", metatag, metaindex, int(buffer.size())); printf(" "); - // print up to 60 characters of metadata - UINT32 count = MIN(60, buffer.size()); + UINT32 count = buffer.size(); + // limit output to 60 characters of metadata if not verbose + if (!verbose) + count = MIN(60, count); for (int chnum = 0; chnum < count; chnum++) printf("%c", isprint(UINT8(buffer[chnum])) ? buffer[chnum] : '.'); printf("\n"); } // print compression stats if verbose - if (params.find(OPTION_VERBOSE) != params.end()) + if (verbose) { UINT32 compression_types[10] = { 0 }; for (UINT32 hunknum = 0; hunknum < input_chd.hunk_count(); hunknum++) |
