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

Allow ncurses refresh rate to be set dynamically

This allows us to have a higher refresh rate only when necessary (e.g. games)
This commit is contained in:
jfreegman
2021-11-20 09:49:04 -05:00
parent 1803da85c1
commit b7002ef3f0
5 changed files with 45 additions and 9 deletions

View File

@ -50,6 +50,9 @@
#define TIME_STR_SIZE 32
#define COLOR_STR_SIZE 10 /* should fit every color option */
#define NCURSES_DEFAULT_REFRESH_RATE 100
#define NCURSES_GAME_REFRESH_RATE 25
#ifndef MAX_PORT_RANGE
#define MAX_PORT_RANGE 65535
#endif
@ -104,6 +107,9 @@ void unlock_status(void);
void flag_interface_refresh(void);
/* Sets ncurses refresh rate. Lower values make it refresh more often. */
void set_window_refresh_rate(size_t refresh_rate);
void exit_toxic_success(Tox *m);
void exit_toxic_err(const char *errmsg, int errcode);