mirror of
https://github.com/Tha14/toxic.git
synced 2024-11-22 23:33:02 +01:00
Reduce sound notify polling by factor of 10
Polling 100 times per second is excessive. This should help reduce Toxic's resource usage without a noticable difference to the user.
This commit is contained in:
parent
0a708e4a2e
commit
3fddc410b3
@ -318,7 +318,7 @@ void *do_playing(void *_p)
|
|||||||
has_looping = false;
|
has_looping = false;
|
||||||
|
|
||||||
control_unlock();
|
control_unlock();
|
||||||
sleep_thread(10000L);
|
sleep_thread(100000L);
|
||||||
}
|
}
|
||||||
|
|
||||||
pthread_exit(NULL);
|
pthread_exit(NULL);
|
||||||
|
@ -808,15 +808,13 @@ void draw_active_window(Tox *m)
|
|||||||
a->onDraw(a, m);
|
a->onDraw(a, m);
|
||||||
wrefresh(a->window);
|
wrefresh(a->window);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef AUDIO
|
#ifdef AUDIO
|
||||||
else if (a->is_call && timed_out(a->chatwin->infobox.lastupdate, 1)) {
|
else if (a->is_call && timed_out(a->chatwin->infobox.lastupdate, 1)) {
|
||||||
touchwin(a->window);
|
touchwin(a->window);
|
||||||
a->onDraw(a, m);
|
a->onDraw(a, m);
|
||||||
wrefresh(a->window);
|
wrefresh(a->window);
|
||||||
}
|
}
|
||||||
|
#endif // AUDIO
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef GAMES
|
#ifdef GAMES
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user