1
0
mirror of https://github.com/Tha14/toxic.git synced 2025-07-05 05:46:44 +02:00

Added VAD, changed device i/o, mute option, dynamic device changing and more

This commit is contained in:
mannol
2014-06-22 02:18:23 +02:00
parent e06f0ffb7e
commit e47f2c05f3
40 changed files with 1828 additions and 1007 deletions

View File

@ -31,6 +31,8 @@
#include <tox/tox.h>
#include "toxic.h"
#include "windows.h"
#include "chat.h"
#include "friendlist.h"
#include "misc_tools.h"
@ -54,7 +56,7 @@ extern struct user_settings *user_settings;
ToxicFriend friends[MAX_FRIENDS_NUM];
static int friendlist_index[MAX_FRIENDS_NUM] = {0};
struct _pendingDel {
static struct _pendingDel {
int num;
bool active;
} pendingdelete;
@ -162,9 +164,11 @@ static void friendlist_onStatusMessageChange(ToxWindow *self, int32_t num, uint8
if (len > TOX_MAX_STATUSMESSAGE_LENGTH || num >= max_friends_index)
return;
strcpy(friends[num].statusmsg, str);
friends[num].statusmsg[len] = '\0';
str[len] = '\0';
snprintf(friends[num].statusmsg, sizeof(friends[num].statusmsg), "%s", str);
len = strlen(friends[num].statusmsg);
friends[num].statusmsg_len = len;
friends[num].statusmsg[len] = '\0';
}
void friendlist_onFriendAdded(ToxWindow *self, Tox *m, int32_t num, bool sort)