Merge branch 'headless_help_fix' of https://github.com/ThomasWilshaw/olive into ThomasWilshaw-headless_help_fix

This commit is contained in:
itsmattkc
2020-09-05 18:51:48 +10:00
3 changed files with 11 additions and 3 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)
+9 -2
View File
@@ -115,17 +115,24 @@ void CommandLineParser::PrintHelp(const char* filename)
}
const char* basename;
bool path = true;
#ifdef Q_OS_WINDOWS
basename = strrchr(filename, '\\');
if (!basename) {
basename = strrchr(filename, '/');
}
// If no slashes are found we are probably running Olive from the executables own directory
// so we set basename equal to the filename (olive-editor.exe). This ensures basename is
// always valid.
if (!basename) {
basename = filename;
path = false;
}
#else
basename = strrchr(filename, '/');
#endif
printf("Usage: %s [options] %s\n\n", basename + 1, positional_args.toUtf8().constData());
printf("Usage: %s [options] %s\n\n", path ? basename + 1 : 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"