Make -listmedia compatible with grep/find

Examples:

List all systems with .tap support: mame -listmedia | find ".tap"

List all systems with paper tape reader: mame -listmedia | grep (ptap
This commit is contained in:
Robbbert 2021-02-20 20:37:18 +11:00
parent a16eba4052
commit 4d31ab1fff

View File

@ -819,7 +819,7 @@ void cli_frontend::listmedia(const std::vector<std::string> &args)
std::string paren_shortname = string_format("(%s)", imagedev.brief_instance_name());
// output the line, up to the list of extensions
printf("%-16s %-16s %-10s ", first ? drivlist.driver().name : "", imagedev.instance_name().c_str(), paren_shortname.c_str());
printf("%-16s %-16s %-10s ", drivlist.driver().name, imagedev.instance_name().c_str(), paren_shortname.c_str());
// get the extensions and print them
std::string extensions(imagedev.file_extensions());