Merge branch 'ThomasWilshaw-headless_help_fix'

This commit is contained in:
itsmattkc
2020-09-05 18:57:08 +10:00
3 changed files with 10 additions and 2 deletions
+1 -1
View File
@@ -288,7 +288,7 @@ PixelFormat::Format OIIODecoder::GetFormatFromOIIOBasetype(const OIIO::ImageSpec
rational OIIODecoder::GetPixelAspectRatioFromOIIO(const OIIO::ImageSpec &spec)
{
return rational::fromDouble(spec.extra_attribs.get_float("PixelAspectRatio", 1));
return rational::fromDouble(spec.get_float_attribute("PixelAspectRatio", 1));
}
bool OIIODecoder::FileTypeIsSupported(const QString& fn)
+8 -1
View File
@@ -124,8 +124,15 @@ void CommandLineParser::PrintHelp(const char* filename)
basename = strrchr(filename, '/');
#endif
printf("Usage: %s [options] %s\n\n", basename + 1, positional_args.toUtf8().constData());
if (basename) {
// Slash found, increment pointer to avoid showing the slash itself
basename++;
} else {
// If no slashes are found, assume string is already a basename
basename = filename;
}
printf("Usage: %s [options] %s\n\n", basename, positional_args.toUtf8().constData());
foreach (const KnownOption& o, options_) {
QString all_args;
+1
View File
@@ -22,6 +22,7 @@
#define COMMANDLINEPARSER_H
#include <QStringList>
#include <QVector>
#include "common/define.h"