libobs/util: Add dll version compare func
parent
46c8ef615d
commit
675530204e
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue