mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-04 09:00:44 +00:00
A couple of improvements to convert cmd, fail if format isn't explicit
This commit is contained in:
@@ -664,14 +664,14 @@ struct ConvertCommand : public Command
|
||||
|
||||
if(infile.empty())
|
||||
{
|
||||
std::cerr << "Need an input filename." << std::endl;
|
||||
std::cerr << "Need an input filename (-f)." << std::endl << std::endl;
|
||||
std::cerr << parser.usage() << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
if(outfile.empty())
|
||||
{
|
||||
std::cerr << "Need an output filename." << std::endl;
|
||||
std::cerr << "Need an output filename (-o)." << std::endl << std::endl;
|
||||
std::cerr << parser.usage() << std::endl;
|
||||
return 1;
|
||||
}
|
||||
@@ -695,6 +695,13 @@ struct ConvertCommand : public Command
|
||||
}
|
||||
}
|
||||
|
||||
if(infmt.empty())
|
||||
{
|
||||
std::cerr << "Couldn't guess input format from filename." << std::endl << std::endl;
|
||||
std::cerr << parser.usage() << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
if(outfmt.empty())
|
||||
{
|
||||
// try to guess the format by looking for the extension in the filename
|
||||
@@ -711,6 +718,13 @@ struct ConvertCommand : public Command
|
||||
}
|
||||
}
|
||||
|
||||
if(outfmt.empty())
|
||||
{
|
||||
std::cerr << "Couldn't guess output format from filename." << std::endl << std::endl;
|
||||
std::cerr << parser.usage() << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
ICaptureFile *file = RENDERDOC_OpenCaptureFile();
|
||||
|
||||
ReplayStatus st = file->OpenFile(infile.c_str(), infmt.c_str());
|
||||
|
||||
Reference in New Issue
Block a user