Commit 0939e5cb authored by Hisham Muhammad's avatar Hisham Muhammad
Browse files

Settings: fix default and storage of sort keys

parent e1c2dc56
Showing with 5 additions and 2 deletions
+5 -2
......@@ -216,6 +216,9 @@ static void Settings_defaultMeters(Settings* this) {
}
static const char* toFieldName(int i) {
if (i < 0 || i > LAST_PROCESSFIELD) {
return "";
}
return Process_fields[i].name;
}
......@@ -275,7 +278,7 @@ static void Settings_defaultScreens(Settings* this) {
for (unsigned int i = 0; i < Platform_numberOfDefaultScreens; i++) {
ScreenDefaults* defaults = &Platform_defaultScreens[i];
Settings_newScreen(this, defaults->name, defaults->columns);
this->screens[0]->sortKey = toFieldIndex(defaults->sortKey);
this->screens[i]->sortKey = toFieldIndex(defaults->sortKey);
}
}
......
......@@ -101,7 +101,7 @@ ScreenDefaults Platform_defaultScreens[] = {
{
.name = "L1 Data Cache",
.columns = "PID USER PERCENT_CPU L1DREADS L1DRMISSES L1DWRITES L1DWMISSES Command",
.sortKey = "LD1READS",
.sortKey = "L1DREADS",
},
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment