From cf960c407ab60b5179d8085e6f7461288aef6e19 Mon Sep 17 00:00:00 2001 From: epoch Date: Mon, 10 Apr 2017 04:52:02 -0500 Subject: cleaned up a bit of stuff and added another option to config.h --- src/hackvr.c | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) (limited to 'src/hackvr.c') diff --git a/src/hackvr.c b/src/hackvr.c index c8e3899..d97417a 100644 --- a/src/hackvr.c +++ b/src/hackvr.c @@ -81,7 +81,7 @@ char **line_splitter(char *line,int *rlen) { return a; } -int load_stdin() { +int load_stdin() {//what is this returning? struct c3_shape s; // struct c3_line l; char *command; @@ -385,20 +385,10 @@ int main(int argc,char *argv[]) { setbuf(stdout,0); global.debug=DEBUG; #ifdef GRAPHICAL - int redraw; graphics_init(); #endif printf("# entering main loop\n"); for(;;) { -#ifdef GRAPHICAL - if((redraw=graphics_event_handler()) == -1) { - return 0; - } -// printf("redraw=%d gra_global.force_redraw=%d global.headless=%d\n",redraw,gra_global.force_redraw,global.headless); - //if((redraw || gra_global.force_redraw) && !global.headless) { - // draw_screen(); - //} -#endif switch(load_stdin()) { case -1: return 0; @@ -406,11 +396,11 @@ int main(int argc,char *argv[]) { case 0: break; default: -#ifdef GRAPHICAL - redraw=1; -#endif break; } +#ifdef GRAPHICAL + graphics_event_handler();//this thing should call draw_screen when it needs to. +#endif } return 0; } -- cgit v1.2.3