diff options
author | 2021-01-21 23:33:53 +1100 | |
---|---|---|
committer | 2021-01-21 23:33:53 +1100 | |
commit | 7cfe419ca809eb8572f5a0c1e85e8170342c028e (patch) | |
tree | c64b2e2230ff7b23fe9122bf74096ddef3420c00 /src/tools/chdman.cpp | |
parent | ef82fd102d548e70aa73e3ba189a6e2d5464b405 (diff) |
-osd/windows: Minimise full-screen windows on losing focus (#2997).
-osd/modules/osdwindow.cpp: Clean up window title formatting.
* Show data type model in window title.
* Moved window title formatting to a single place.
-tools/chdman.cpp: Removed some unnecessary .c_str() calls.
Diffstat (limited to 'src/tools/chdman.cpp')
-rw-r--r-- | src/tools/chdman.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/tools/chdman.cpp b/src/tools/chdman.cpp index c4cf8302aa3..6ea7648522c 100644 --- a/src/tools/chdman.cpp +++ b/src/tools/chdman.cpp @@ -1318,14 +1318,15 @@ void output_track_metadata(int mode, util::core_file &file, int tracknum, const size = 2352; break; } - bool needquote = filename.find(' ') != std::string::npos; - file.printf("%d %d %d %d %s%s%s %d\n", tracknum+1, frameoffs, mode, size, needquote?"\"":"", filename.c_str(), needquote?"\"":"", discoffs); + const bool needquote = filename.find(' ') != std::string::npos; + const char *const quotestr = needquote ? "\"" : ""; + file.printf("%d %d %d %d %s%s%s %d\n", tracknum+1, frameoffs, mode, size, quotestr, filename, quotestr, discoffs); } else if (mode == MODE_CUEBIN) { // first track specifies the file if (tracknum == 0) - file.printf("FILE \"%s\" BINARY\n", filename.c_str()); + file.printf("FILE \"%s\" BINARY\n", filename); // determine submode std::string tempstr; @@ -1404,9 +1405,9 @@ void output_track_metadata(int mode, util::core_file &file, int tracknum, const // all tracks but the first one have a file offset if (tracknum > 0) - file.printf("DATAFILE \"%s\" #%d %s // length in bytes: %d\n", filename.c_str(), uint32_t(discoffs), msf_string_from_frames(info.frames), info.frames * (info.datasize + info.subsize)); + file.printf("DATAFILE \"%s\" #%d %s // length in bytes: %d\n", filename, uint32_t(discoffs), msf_string_from_frames(info.frames), info.frames * (info.datasize + info.subsize)); else - file.printf("DATAFILE \"%s\" %s // length in bytes: %d\n", filename.c_str(), msf_string_from_frames(info.frames), info.frames * (info.datasize + info.subsize)); + file.printf("DATAFILE \"%s\" %s // length in bytes: %d\n", filename, msf_string_from_frames(info.frames), info.frames * (info.datasize + info.subsize)); // tracks with pregaps get a START marker too if (info.pregap > 0) |