From 9ff0ebb74c03433bac557d693b4684c01dc20e45 Mon Sep 17 00:00:00 2001 From: epoch Date: Fri, 17 Jul 2020 03:54:35 -0500 Subject: changed to using redrawplzkthx instead of force_redraw to request a redraw. force_redraw will now request /another/ directly after a previous draw so it does what it is named now. --- src/hackvr.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/hackvr.c') diff --git a/src/hackvr.c b/src/hackvr.c index 775564a..8abc0d6 100644 --- a/src/hackvr.c +++ b/src/hackvr.c @@ -134,6 +134,7 @@ void hvr_version() { int hackvr_handler(char *line); void hackvr_handler_idc(struct shit *me,char *line) { + //fprintf(stderr,"# got a hackvr line.\n"); switch(hackvr_handler(line)) { case -1://quit fprintf(stderr,"# exiting due to EOF\n"); @@ -419,7 +420,7 @@ int hackvr_handler(char *line) { #endif return ret; } - fprintf(stderr,"# %s toggled!\n",a[2]); + fprintf(stderr,"# %s toggled.\n",a[2]); ret=1; return ret; } @@ -744,9 +745,13 @@ int export_file(FILE *fp) {//not used yet. maybe export in obj optionally? no. t #ifdef GRAPHICAL void redraw_handler(struct shit *me,char *line) {//how do we strip out extra redraws? - if(gra_global.force_redraw) { + fprintf(stderr,"# attempting to redraw\n"); + if(gra_global.redrawplzkthx) {//this is how multiple calls to redraw() don't cause a flood of draw_screen(); draw_screen(); - gra_global.force_redraw=0; + gra_global.redrawplzkthx=0; + if(gra_global.force_redraw == 1) { + redraw();//wew. + } } } #endif -- cgit v1.2.3