diff options
author | epoch <epoch@hacking.allowed.org> | 2020-07-17 03:54:35 -0500 |
---|---|---|
committer | epoch <epoch@hacking.allowed.org> | 2020-07-17 03:54:35 -0500 |
commit | 9ff0ebb74c03433bac557d693b4684c01dc20e45 (patch) | |
tree | 454b4cbe433f81b3783cb41b1c5d07eb09f43317 | |
parent | d1347508d7080980eb1a4974ab91d98bb08c39b1 (diff) | |
download | hackvr-9ff0ebb74c03433bac557d693b4684c01dc20e45.tar.gz hackvr-9ff0ebb74c03433bac557d693b4684c01dc20e45.zip |
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.
-rw-r--r-- | src/hackvr.c | 11 |
1 files changed, 8 insertions, 3 deletions
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 |