Add scr.analbar config var to have progressbar without scr.demo ##analysis

This commit is contained in:
pancake 2023-11-14 10:17:18 +01:00
parent 1cffe1e427
commit 8e7c792f58
2 changed files with 3 additions and 2 deletions

View File

@ -4326,6 +4326,7 @@ R_API int r_core_config_init(RCore *core) {
SETCB ("scr.utf8", r_str_bool (r_cons_is_utf8()), &cb_utf8, "show UTF-8 characters instead of ANSI");
SETCB ("scr.utf8.curvy", "false", &cb_utf8_curvy, "show curved UTF-8 corners (requires scr.utf8)");
SETCB ("scr.demo", "false", &cb_scr_demo, "use demoscene effects if available");
SETPREF ("scr.analbar", "false", "show progressbar for aaa instead of logging what its doing");
SETCB ("scr.hist.block", "true", &cb_scr_histblock, "use blocks for histogram");
SETCB ("scr.hist.filter", "true", &cb_scr_histfilter, "filter history for matching lines when using up/down keys");
#if __EMSCRIPTEN__ || __wasi__

View File

@ -12927,11 +12927,11 @@ static void anal_aarr(RCore *core) {
}
static void logline(RCore *core, int pc, const char *title) {
if (r_config_get_b (core->config, "scr.demo")) {
if (r_config_get_b (core->config, "scr.analbar") || r_config_get_b (core->config, "scr.demo")) {
int w = 80;
r_cons_printf (R_CONS_CLEAR_LINE);
r_cons_flush ();
R_LOG_INFO ("%s", title);
// R_LOG_INFO ("%s", title);
r_print_progressbar (core->print, pc, w, NULL);
r_cons_printf ("\r");
r_cons_flush ();