|
@@ -532,7 +532,6 @@ static inline void print_status(int thr_id)
|
|
|
|
|
|
|
|
if (unlikely(!curses_active))
|
|
if (unlikely(!curses_active))
|
|
|
return;
|
|
return;
|
|
|
- getyx(mainwin, logcursor, x);
|
|
|
|
|
|
|
|
|
|
move(2,0);
|
|
move(2,0);
|
|
|
printw("Totals: %s", statusline);
|
|
printw("Totals: %s", statusline);
|
|
@@ -566,11 +565,10 @@ static inline void print_status(int thr_id)
|
|
|
|
|
|
|
|
static void refresh_display(void)
|
|
static void refresh_display(void)
|
|
|
{
|
|
{
|
|
|
- int i, x, maxy;
|
|
|
|
|
|
|
+ int i, x;
|
|
|
|
|
|
|
|
if (unlikely(!curses_active))
|
|
if (unlikely(!curses_active))
|
|
|
return;
|
|
return;
|
|
|
- getyx(mainwin, logcursor, x);
|
|
|
|
|
|
|
|
|
|
move(0,0);
|
|
move(0,0);
|
|
|
attron(A_BOLD);
|
|
attron(A_BOLD);
|
|
@@ -586,7 +584,6 @@ static void refresh_display(void)
|
|
|
move(logstart, 0);
|
|
move(logstart, 0);
|
|
|
clrtoeol();
|
|
clrtoeol();
|
|
|
hline('-', 80);
|
|
hline('-', 80);
|
|
|
- move(logcursor, 0);
|
|
|
|
|
|
|
|
|
|
for (i = 0; i < mining_threads; i++)
|
|
for (i = 0; i < mining_threads; i++)
|
|
|
print_status(i);
|
|
print_status(i);
|
|
@@ -597,16 +594,17 @@ static void refresh_display(void)
|
|
|
|
|
|
|
|
void log_curses(const char *f, va_list ap)
|
|
void log_curses(const char *f, va_list ap)
|
|
|
{
|
|
{
|
|
|
- int i, x, maxy;
|
|
|
|
|
|
|
+ int x;
|
|
|
|
|
|
|
|
if (unlikely(!curses_active))
|
|
if (unlikely(!curses_active))
|
|
|
return;
|
|
return;
|
|
|
|
|
+
|
|
|
|
|
+ /* Scroll log output downwards */
|
|
|
|
|
+ getmaxyx(mainwin, logcursor, x);
|
|
|
|
|
+ move(--logcursor, 0);
|
|
|
vw_printw(mainwin, f, ap);
|
|
vw_printw(mainwin, f, ap);
|
|
|
clrtoeol();
|
|
clrtoeol();
|
|
|
- getyx(mainwin, logcursor, x);
|
|
|
|
|
|
|
|
|
|
- /* Scroll log output downwards */
|
|
|
|
|
- getmaxyx(mainwin, maxy, x);
|
|
|
|
|
refresh_display();
|
|
refresh_display();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -1994,6 +1992,7 @@ int main (int argc, char *argv[])
|
|
|
idlok(mainwin, true);
|
|
idlok(mainwin, true);
|
|
|
scrollok(mainwin, true);
|
|
scrollok(mainwin, true);
|
|
|
curses_active = true;
|
|
curses_active = true;
|
|
|
|
|
+ getmaxyx(mainwin, logcursor, i);
|
|
|
move(logcursor, 0);
|
|
move(logcursor, 0);
|
|
|
refresh_display();
|
|
refresh_display();
|
|
|
|
|
|