mirror of
https://github.com/Tha14/toxic.git
synced 2025-07-04 16:56:45 +02:00
Add ability to compile without game support
This commit is contained in:
@ -118,7 +118,9 @@ void kill_friendlist(ToxWindow *self)
|
||||
for (size_t i = 0; i < Friends.max_idx; ++i) {
|
||||
if (Friends.list[i].active) {
|
||||
free(Friends.list[i].conference_invite.key);
|
||||
#ifdef GAMES
|
||||
free(Friends.list[i].game_invite.data);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@ -583,6 +585,8 @@ static void friendlist_add_blocked(uint32_t fnum, uint32_t bnum)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef GAMES
|
||||
|
||||
static void friendlist_onGameInvite(ToxWindow *self, Tox *m, uint32_t friend_number, const uint8_t *data, size_t length)
|
||||
{
|
||||
UNUSED_VAR(self);
|
||||
@ -611,6 +615,8 @@ static void friendlist_onGameInvite(ToxWindow *self, Tox *m, uint32_t friend_num
|
||||
sound_notify(prompt, notif_error, NT_WNDALERT_1, NULL);
|
||||
}
|
||||
|
||||
#endif // GAMES
|
||||
|
||||
static void friendlist_onFileRecv(ToxWindow *self, Tox *m, uint32_t num, uint32_t filenum,
|
||||
uint64_t file_size, const char *filename, size_t name_length)
|
||||
{
|
||||
@ -1397,7 +1403,6 @@ ToxWindow *new_friendlist(void)
|
||||
ret->onStatusMessageChange = &friendlist_onStatusMessageChange;
|
||||
ret->onFileRecv = &friendlist_onFileRecv;
|
||||
ret->onConferenceInvite = &friendlist_onConferenceInvite;
|
||||
ret->onGameInvite = &friendlist_onGameInvite;
|
||||
|
||||
#ifdef AUDIO
|
||||
ret->onInvite = &friendlist_onAV;
|
||||
@ -1413,6 +1418,10 @@ ToxWindow *new_friendlist(void)
|
||||
ret->is_call = false;
|
||||
#endif /* AUDIO */
|
||||
|
||||
#ifdef GAMES
|
||||
ret->onGameInvite = &friendlist_onGameInvite;
|
||||
#endif
|
||||
|
||||
ret->num = -1;
|
||||
ret->active_box = -1;
|
||||
|
||||
|
Reference in New Issue
Block a user