diff --git a/src/btop_draw.cpp b/src/btop_draw.cpp index 6f55e7d..bf1760f 100644 --- a/src/btop_draw.cpp +++ b/src/btop_draw.cpp @@ -532,6 +532,9 @@ namespace Cpu { bool show_temps = (Config::getB("check_temp") and got_sensors); auto single_graph = Config::getB("cpu_single_graph"); bool hide_cores = show_temps and (cpu_temp_only or not Config::getB("show_coretemp")); + bool show_temps = (Config::getB("check_temp") and got_sensors); + auto single_graph = Config::getB("cpu_single_graph"); + bool hide_cores = show_temps and (cpu_temp_only or not Config::getB("show_coretemp")); const int extra_width = (hide_cores ? max(6, 6 * b_column_size) : 0); const auto& show_gpu_info = Config::getS("show_gpu_info"); bool show_gpu = (gpus.size() > 0 and (show_gpu_info == "On" or (show_gpu_info == "Auto" and Gpu::shown == 0))); @@ -551,6 +554,9 @@ namespace Cpu { const string& title_left = Theme::c("cpu_box") + (cpu_bottom ? Symbols::title_left_down : Symbols::title_left); const string& title_right = Theme::c("cpu_box") + (cpu_bottom ? Symbols::title_right_down : Symbols::title_right); static int bat_pos = 0, bat_len = 0; + if (cpu.cpu_percent.at("total").empty() + or cpu.core_percent.at(0).empty() + or (show_temps and cpu.temp.at(0).empty())) return ""; if (cpu.cpu_percent.at("total").empty() or cpu.core_percent.at(0).empty() or (show_temps and cpu.temp.at(0).empty())) return ""; diff --git a/src/btop_input.cpp b/src/btop_input.cpp index 739dcb4..583582c 100644 --- a/src/btop_input.cpp +++ b/src/btop_input.cpp @@ -32,6 +32,14 @@ tab-size = 4 #include "btop_draw.hpp" +#include "btop_input.hpp" +#include "btop_tools.hpp" +#include "btop_config.hpp" +#include "btop_shared.hpp" +#include "btop_menu.hpp" +#include "btop_draw.hpp" + + using std::cin; using namespace Tools;