Improved internal API for version info.
This commit is contained in:
parent
4085e0b57a
commit
2147ef1a34
@ -76,6 +76,7 @@ static const struct
|
||||
unsigned int ver_major;
|
||||
unsigned int ver_minor;
|
||||
unsigned int ver_patch;
|
||||
unsigned int ver_build;
|
||||
const char* ver_date;
|
||||
const char* ver_time;
|
||||
}
|
||||
@ -84,6 +85,7 @@ g_x264_version =
|
||||
(VER_X264_MAJOR),
|
||||
(VER_X264_MINOR),
|
||||
(VER_X264_PATCH),
|
||||
(VER_X264_BUILD),
|
||||
__DATE__,
|
||||
__TIME__
|
||||
};
|
||||
@ -355,12 +357,12 @@ unsigned int x264_version_major(void)
|
||||
|
||||
unsigned int x264_version_minor(void)
|
||||
{
|
||||
return g_x264_version.ver_minor;
|
||||
return (g_x264_version.ver_minor * 10) + (g_x264_version.ver_patch % 10);
|
||||
}
|
||||
|
||||
unsigned int x264_version_patch(void)
|
||||
unsigned int x264_version_build(void)
|
||||
{
|
||||
return g_x264_version.ver_patch;
|
||||
return g_x264_version.ver_build;
|
||||
}
|
||||
|
||||
const char *x264_version_compiler(void)
|
||||
|
@ -97,7 +97,7 @@ void x264_invalid_param_handler(const wchar_t*, const wchar_t*, const wchar_t*,
|
||||
void x264_message_handler(QtMsgType type, const char *msg);
|
||||
unsigned int x264_version_major(void);
|
||||
unsigned int x264_version_minor(void);
|
||||
unsigned int x264_version_patch(void);
|
||||
unsigned int x264_version_build(void);
|
||||
const QDate &x264_version_date(void);
|
||||
bool x264_portable(void);
|
||||
const QString &x264_data_path(void);
|
||||
|
@ -38,7 +38,7 @@ static int x264_main(int argc, char* argv[])
|
||||
x264_init_console(argc, argv);
|
||||
|
||||
//Print version info
|
||||
qDebug("Simple x264 Launcher v%u.%02u.%u - use 64-Bit x264 with 32-Bit Avisynth", x264_version_major(), x264_version_minor(), x264_version_patch());
|
||||
qDebug("Simple x264 Launcher v%u.%02u.%u - use 64-Bit x264 with 32-Bit Avisynth", x264_version_major(), x264_version_minor(), x264_version_build());
|
||||
qDebug("Copyright (c) 2004-%04d LoRd_MuldeR <mulder2@gmx.de>. Some rights reserved.", qMax(x264_version_date().year(),QDate::currentDate().year()));
|
||||
qDebug("Built on %s at %s with %s for Win-%s.\n", x264_version_date().toString(Qt::ISODate).toLatin1().constData(), x264_version_time(), x264_version_compiler(), x264_version_arch());
|
||||
|
||||
|
@ -382,7 +382,7 @@ void MainWindow::showAbout(void)
|
||||
{
|
||||
QString text;
|
||||
|
||||
text += QString().sprintf("<nobr><tt>Simple x264 Launcher v%u.%02u.%u - use 64-Bit x264 with 32-Bit Avisynth<br>", x264_version_major(), x264_version_minor(), x264_version_patch());
|
||||
text += QString().sprintf("<nobr><tt>Simple x264 Launcher v%u.%02u.%u - use 64-Bit x264 with 32-Bit Avisynth<br>", x264_version_major(), x264_version_minor(), x264_version_build());
|
||||
text += QString().sprintf("Copyright (c) 2004-%04d LoRd_MuldeR <mulder2@gmx.de>. Some rights reserved.<br>", qMax(x264_version_date().year(),QDate::currentDate().year()));
|
||||
text += QString().sprintf("Built on %s at %s with %s for Win-%s.<br><br>", x264_version_date().toString(Qt::ISODate).toLatin1().constData(), x264_version_time(), x264_version_compiler(), x264_version_arch());
|
||||
text += QString().sprintf("This program is free software: you can redistribute it and/or modify<br>");
|
||||
|
Loading…
Reference in New Issue
Block a user