mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
update the compatablity function to match the macro
This commit is contained in:
parent
2d361228cd
commit
96bf594be5
@ -121,10 +121,11 @@ uint32_t toxav_version_patch(void)
|
|||||||
|
|
||||||
bool toxav_version_is_compatible(uint32_t major, uint32_t minor, uint32_t patch)
|
bool toxav_version_is_compatible(uint32_t major, uint32_t minor, uint32_t patch)
|
||||||
{
|
{
|
||||||
if (major != TOXAV_VERSION_MAJOR)
|
return (TOXAV_VERSION_MAJOR == major && /* Force the major version */
|
||||||
return 0;
|
(TOXAV_VERSION_MINOR > minor || /* Current minor version must be newer than requested -- or -- */
|
||||||
else
|
(TOXAV_VERSION_MINOR == minor && TOX_VERSION_PATCH >= patch) /* the patch must be the same or newer */
|
||||||
return 1;
|
)
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
ToxAV *toxav_new(Tox *tox, TOXAV_ERR_NEW *error)
|
ToxAV *toxav_new(Tox *tox, TOXAV_ERR_NEW *error)
|
||||||
|
@ -87,10 +87,11 @@ uint32_t tox_version_patch(void)
|
|||||||
|
|
||||||
bool tox_version_is_compatible(uint32_t major, uint32_t minor, uint32_t patch)
|
bool tox_version_is_compatible(uint32_t major, uint32_t minor, uint32_t patch)
|
||||||
{
|
{
|
||||||
if (major != TOX_VERSION_MAJOR)
|
return (TOX_VERSION_MAJOR == major && /* Force the major version */
|
||||||
return 0;
|
(TOX_VERSION_MINOR > minor || /* Current minor version must be newer than requested -- or -- */
|
||||||
else
|
(TOX_VERSION_MINOR == minor && TOX_VERSION_PATCH >= patch) /* the patch must be the same or newer */
|
||||||
return 1;
|
)
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user