Browse Source

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

nfactor-troky
Con Kolivas 11 years ago
parent
commit
01fca3e756
  1. 11
      cgminer.c
  2. 1
      driver-opencl.c
  3. 1
      miner.h

11
cgminer.c

@ -2215,6 +2215,14 @@ void clear_logwin(void) @@ -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: @@ -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: @@ -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: @@ -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)) {

1
driver-opencl.c

@ -740,6 +740,7 @@ retry: @@ -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)

1
miner.h

@ -1269,6 +1269,7 @@ extern void zero_stats(void); @@ -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);

Loading…
Cancel
Save