mirror of
https://github.com/dankamongmen/notcurses.git
synced 2024-11-02 09:40:15 +00:00
demo: change plot to 2Hz to avoid gaps
This commit is contained in:
parent
a3220b8a73
commit
22790943bc
@ -26,7 +26,7 @@ static int plot_grab_y = -1;
|
|||||||
// position of the plot *when grab started*
|
// position of the plot *when grab started*
|
||||||
static int plot_pos_y;
|
static int plot_pos_y;
|
||||||
|
|
||||||
#define FPSHZ 10
|
#define FPSHZ 2
|
||||||
|
|
||||||
// how many columns for runtime?
|
// how many columns for runtime?
|
||||||
#define HUD_ROWS (3 + 2) // 2 for borders
|
#define HUD_ROWS (3 + 2) // 2 for borders
|
||||||
@ -642,7 +642,7 @@ int fpsgraph_init(struct notcurses* nc){
|
|||||||
NCPLOT_OPTION_PRINTSAMPLE;
|
NCPLOT_OPTION_PRINTSAMPLE;
|
||||||
opts.gridtype = NCBLIT_BRAILLE;
|
opts.gridtype = NCBLIT_BRAILLE;
|
||||||
opts.legendstyle = NCSTYLE_ITALIC | NCSTYLE_BOLD;
|
opts.legendstyle = NCSTYLE_ITALIC | NCSTYLE_BOLD;
|
||||||
opts.title = "frames per decisecond";
|
opts.title = "frames per semisecond";
|
||||||
channels_set_fg_rgb8(&opts.minchannels, 0x80, 0x80, 0xff);
|
channels_set_fg_rgb8(&opts.minchannels, 0x80, 0x80, 0xff);
|
||||||
channels_set_bg_rgb(&opts.minchannels, 0x201020);
|
channels_set_bg_rgb(&opts.minchannels, 0x201020);
|
||||||
channels_set_bg_alpha(&opts.minchannels, CELL_ALPHA_BLEND);
|
channels_set_bg_alpha(&opts.minchannels, CELL_ALPHA_BLEND);
|
||||||
|
@ -286,7 +286,7 @@ class ncppplot {
|
|||||||
if(printsample){
|
if(printsample){
|
||||||
int lastslot = slotstart ? slotstart - 1 : slotcount - 1;
|
int lastslot = slotstart ? slotstart - 1 : slotcount - 1;
|
||||||
ncplane_set_styles(ncp, legendstyle);
|
ncplane_set_styles(ncp, legendstyle);
|
||||||
ncplane_printf_aligned(ncp, dimy - 1, NCALIGN_RIGHT, "%ju", (uintmax_t)slots[lastslot]);
|
ncplane_printf_aligned(ncp, 0, NCALIGN_RIGHT, "%ju", (uintmax_t)slots[lastslot]);
|
||||||
}
|
}
|
||||||
ncplane_home(ncp);
|
ncplane_home(ncp);
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user