btop icon indicating copy to clipboard operation
btop copied to clipboard

Don't depend on b_column_size to show core temps

Open RipleyTom opened this issue 11 months ago • 0 comments

b_column_size calculation always takes into account 6 columns to show temperature:

        #ifdef GPU_SUPPORT
            b_columns = max(1, (int)ceil((double)(Shared::coreCount + 1) / (height - gpus_extra_height - 5)));
        #else
            b_columns = max(1, (int)ceil((double)(Shared::coreCount + 1) / (height - 5)));
        #endif
            if (b_columns * (21 + 12 * show_temp) < width - (width / 3)) {
                b_column_size = 2;
                b_width = (21 + 12 * show_temp) * b_columns - (b_columns - 1);
            }
            else if (b_columns * (15 + 6 * show_temp) < width - (width / 3)) {
                b_column_size = 1;
                b_width = (15 + 6 * show_temp) * b_columns - (b_columns - 1);
            }
            else if (b_columns * (8 + 6 * show_temp) < width - (width / 3)) {
                b_column_size = 0;
            }
            else {
                b_columns = (width - width / 3) / (8 + 6 * show_temp);
                b_column_size = 0;
            }

So I assume showing core temps should not depend on b_column_size. This fixes core temperatures not showing for me.

RipleyTom avatar Mar 14 '24 05:03 RipleyTom