Merge branch 'headless_help_fix' of https://github.com/ThomasWilshaw/olive into 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)
|
||||
{
|
||||
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)
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#define COMMANDLINEPARSER_H
|
||||
|
||||
#include <QStringList>
|
||||
#include <QVector>
|
||||
|
||||
#include "common/define.h"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user