libobs/util: Add dll version compare func

master
jp9000 2020-02-26 22:24:14 -08:00
parent 46c8ef615d
commit 675530204e
1 changed files with 18 additions and 0 deletions

View File

@ -29,6 +29,24 @@ struct win_version_info {
int revis;
};
static inline int win_version_compare(struct win_version_info *dst,
struct win_version_info *src)
{
if (dst->major > src->major)
return 1;
if (dst->major == src->major) {
if (dst->minor > src->minor)
return 1;
if (dst->minor == src->minor) {
if (dst->build > src->build)
return 1;
if (dst->build == src->build)
return 0;
}
}
return -1;
}
EXPORT bool is_64_bit_windows(void);
EXPORT bool get_dll_ver(const wchar_t *lib, struct win_version_info *info);
EXPORT void get_win_ver(struct win_version_info *info);