From a1f549f07c378aa57852e288f0405ac8af18d907 Mon Sep 17 00:00:00 2001 From: epoch Date: Sun, 24 Jan 2021 20:24:21 -0600 Subject: added a state var, and a title var. svg will now use those in its output "svg" (html) --- src/graphics_cs_svg.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'src/graphics_cs_svg.c') diff --git a/src/graphics_cs_svg.c b/src/graphics_cs_svg.c index 210a1cf..65f0bc5 100644 --- a/src/graphics_cs_svg.c +++ b/src/graphics_cs_svg.c @@ -143,7 +143,15 @@ void draw_cs_filled_shape(cs_s_t s) { //should I do clipping in each graphics lib or make graphics.c just have clipping stuff? void clear_backbuffer() { // strcpy(svg_global.backbuffer,"\n"); - strcpy(svg_global.backbuffer,"\n"); + if(global.state == HVR_STATE_EXIT) {//we only want to actually print a refresh if we're not doing the last frame. + strcpy(svg_global.backbuffer,""); + strcat(svg_global.backbuffer,global.title); + strcat(svg_global.backbuffer,"\n"); + } else { + strcpy(svg_global.backbuffer,""); + strcat(svg_global.backbuffer,global.title); + strcat(svg_global.backbuffer,"\n"); + } strcat(svg_global.backbuffer,"\n"); } @@ -243,7 +251,9 @@ void set_demands_attention() { */ } -void set_title(char *t) { +void set_title(char *t) {//this might need to be put somewhere else... + if(global.title) free(global.title); + global.title=strdup(t); //XStoreName(x11_global.dpy,x11_global.w,t); } -- cgit v1.2.3