1
0
mirror of https://github.com/Tha14/toxic.git synced 2025-06-30 08:26:45 +02:00

Greatly reduce redundant window refreshing

This should substantially reduce CPU usage and possibly fix some
issues with interface jittering/flashing
This commit is contained in:
jfreegman
2021-11-19 17:54:35 -05:00
parent 13337041ce
commit f3f81111c8
10 changed files with 134 additions and 21 deletions

View File

@ -72,8 +72,11 @@ void init_progress_bar(char *progline);
/* prints a progress bar for file transfers */
void print_progress_bar(ToxWindow *self, double pct_done, double bps, uint32_t line_id);
/* refreshes active file transfer status bars. */
void refresh_file_transfer_progress(ToxWindow *self, uint32_t friendnumber);
/* refreshes active file transfer status bars.
*
* Return true if there is at least one active file transfer in either direction.
*/
bool refresh_file_transfer_progress(ToxWindow *self, uint32_t friendnumber);
/* Returns a pointer to friendnumber's FileTransfer struct associated with filenumber.
* Returns NULL if filenumber is invalid.