Compare commits

...

4 Commits

Author SHA1 Message Date
Jakob P. Liljenberg ac62ba9de1
Merge pull request #840 from aristocratos/fix/zero_temp 2024-05-13 19:10:17 +02:00
Jakob P. Liljenberg 3f917c0412
Merge pull request #850 from acidghost/theme-comments 2024-05-13 19:08:45 +02:00
Andrea Jemmett 0127e8b3cd Fix comments in theme files 2024-05-12 16:09:09 +02:00
Jos Dehaes ebc86e9702 fix zero temp (#467) 2024-05-04 20:59:04 +02:00
2 changed files with 7 additions and 1 deletions

View File

@ -381,11 +381,16 @@ namespace Theme {
if (themefile.good()) {
Logger::debug("Loading theme file: " + filename);
while (not themefile.bad()) {
if (themefile.peek() == '#') {
themefile.ignore(SSmax, '\n');
continue;
}
themefile.ignore(SSmax, '[');
if (themefile.eof()) break;
string name, value;
getline(themefile, name, ']');
if (not Default_theme.contains(name)) {
themefile.ignore(SSmax, '\n');
continue;
}
themefile.ignore(SSmax, '=');
@ -394,6 +399,7 @@ namespace Theme {
if (themefile.peek() == '"') {
themefile.ignore(1);
getline(themefile, value, '"');
themefile.ignore(SSmax, '\n');
}
else getline(themefile, value, '\n');

View File

@ -448,7 +448,7 @@ namespace Cpu {
const int file_id = atoi(file.path().filename().c_str() + 4); // skip "temp" prefix
string file_path = file.path();
if (!s_contains(file_path, file_suffix)) {
if (!s_contains(file_path, file_suffix) or s_contains(file_path, "nvme")) {
continue;
}