win-capture: Check hook version before capture init

Checks the hook version to ensure compatibility with hook DLL.  It's
unlikely it'll ever be necessary to increment the hook version, but this
is just a precautionary thing that allows a hook DLL to make sure it's
rejected by an older OBS version if needed.  Again however, very
unlikely that the major version will ever be incremented.
This commit is contained in:
jp9000
2020-02-28 23:24:18 -08:00
parent 74acbd7ed0
commit 7e78c17ace
3 changed files with 23 additions and 0 deletions

View File

@@ -80,6 +80,10 @@ struct graphics_offsets {
};
struct hook_info {
/* hook version */
uint32_t hook_ver_major;
uint32_t hook_ver_minor;
/* capture info */
enum capture_type type;
uint32_t window;
@@ -101,6 +105,8 @@ struct hook_info {
/* hook addresses */
struct graphics_offsets offsets;
uint32_t reserved[128];
};
#pragma pack(pop)