Merge branch 'ThomasWilshaw-headless_help_fix'
This commit is contained in:
@@ -288,7 +288,7 @@ PixelFormat::Format OIIODecoder::GetFormatFromOIIOBasetype(const OIIO::ImageSpec
|
|||||||
|
|
||||||
rational OIIODecoder::GetPixelAspectRatioFromOIIO(const OIIO::ImageSpec &spec)
|
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)
|
bool OIIODecoder::FileTypeIsSupported(const QString& fn)
|
||||||
|
|||||||
@@ -124,8 +124,15 @@ void CommandLineParser::PrintHelp(const char* filename)
|
|||||||
basename = strrchr(filename, '/');
|
basename = strrchr(filename, '/');
|
||||||
#endif
|
#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_) {
|
foreach (const KnownOption& o, options_) {
|
||||||
QString all_args;
|
QString all_args;
|
||||||
|
|
||||||
|
|||||||
@@ -22,6 +22,7 @@
|
|||||||
#define COMMANDLINEPARSER_H
|
#define COMMANDLINEPARSER_H
|
||||||
|
|
||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
|
#include <QVector>
|
||||||
|
|
||||||
#include "common/define.h"
|
#include "common/define.h"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user