[xiph-commits] r17681 - trunk/squishyball
xiphmont at svn.xiph.org
xiphmont at svn.xiph.org
Mon Nov 29 07:23:32 PST 2010
Author: xiphmont
Date: 2010-11-29 07:23:32 -0800 (Mon, 29 Nov 2010)
New Revision: 17681
Modified:
trunk/squishyball/tty.c
Log:
cosmetic fixes to panel updates
Modified: trunk/squishyball/tty.c
===================================================================
--- trunk/squishyball/tty.c 2010-11-29 15:23:14 UTC (rev 17680)
+++ trunk/squishyball/tty.c 2010-11-29 15:23:32 UTC (rev 17681)
@@ -158,7 +158,7 @@
static void draw_playbar(int row){
int pre = floor(p_st/p_len*columns);
- int post = columns-floor(p_end/p_len*columns);
+ int post = columns-floor(p_end/p_len*columns+1.e-6f);
int i;
playrow=row;
@@ -285,6 +285,7 @@
void panel_init(pcm_t **pcm, int test_files, int test_mode, double start, double end, double size,
int flip_mode,int repeat_mode,int trials,char *trial_list){
+
if(min_panel_init(test_mode==3 ? test_files+6:7)){
fprintf(stderr,"Unable to initialize terminal (possibly insufficient lines)\n");
exit(101);
@@ -332,9 +333,12 @@
}
min_putchar(' ');
draw_playbar(playrow);
- force=1;
- panel_update_current(p_cur);
- force=0;
+ {
+ int temp=force;
+ force=1;
+ panel_update_current(p_cur);
+ force=temp;
+ }
}
}
@@ -355,7 +359,7 @@
if(was!=now || force){
int pre = floor(p_st/p_len*columns);
- int post = columns-floor(p_end/p_len*columns);
+ int post = columns-floor(p_end/p_len*columns+1.e-6f);
min_bold(1);
min_gfx(1);
@@ -378,8 +382,8 @@
min_bg(COLOR_BLACK);
}
min_putchar(ACS_VLINE);
+ min_unset();
}
- min_unset();
min_flush();
}
}
@@ -399,9 +403,12 @@
}
min_putchar(' ');
draw_playbar(playrow);
- force=1;
- panel_update_current(p_cur);
- force=0;
+ {
+ int temp=force;
+ force=1;
+ panel_update_current(p_cur);
+ force=temp;
+ }
}
}
More information about the commits
mailing list