1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-01-11 07:17:58 +00:00

Create a logwin_update function which mandatorily updates the logwin and use it when input is expected to prevent display refresh delays.

This commit is contained in:
Con Kolivas 2013-05-19 21:28:53 +10:00
parent ecd03cefb7
commit 000c01dcae
3 changed files with 13 additions and 0 deletions

View File

@ -2215,6 +2215,14 @@ void clear_logwin(void)
unlock_curses();
}
}
void logwin_update(void)
{
if (curses_active_locked()) {
touchwin(logwin);
wrefresh(logwin);
}
}
#endif
static void enable_pool(struct pool *pool)
@ -4115,6 +4123,7 @@ retry:
wlogprint("[A]dd pool [R]emove pool [D]isable pool [E]nable pool\n");
wlogprint("[C]hange management strategy [S]witch pool [I]nformation\n");
wlogprint("Or press any other key to continue\n");
logwin_update();
input = getch();
if (!strncasecmp(&input, "a", 1)) {
@ -4237,6 +4246,7 @@ retry:
opt_compact ? "on" : "off",
opt_log_interval);
wlogprint("Select an option or any other key to return\n");
logwin_update();
input = getch();
if (!strncasecmp(&input, "q", 1)) {
opt_quiet ^= true;
@ -4345,6 +4355,7 @@ retry:
"[W]rite config file\n[C]gminer restart\n",
opt_queue, opt_scantime, opt_expiry);
wlogprint("Select an option or any other key to return\n");
logwin_update();
input = getch();
if (!strncasecmp(&input, "q", 1)) {

View File

@ -740,6 +740,7 @@ retry:
wlogprint("[E]nable [D]isable [I]ntensity [R]estart GPU %s\n",adl_active ? "[C]hange settings" : "");
wlogprint("Or press any other key to continue\n");
logwin_update();
input = getch();
if (nDevs == 1)

View File

@ -1269,6 +1269,7 @@ extern void zero_stats(void);
extern void default_save_file(char *filename);
extern bool log_curses_only(int prio, const char *f, va_list ap);
extern void clear_logwin(void);
extern void logwin_update(void);
extern bool pool_tclear(struct pool *pool, bool *var);
extern struct thread_q *tq_new(void);
extern void tq_free(struct thread_q *tq);