Skip to content

Commit af817d2

Browse files
author
Daniel K. O. (dkosmari)
committed
- Moved shortcut and wpad button handling to libwups.
1 parent f9f32f1 commit af817d2

File tree

3 files changed

+56
-337
lines changed

3 files changed

+56
-337
lines changed

src/cfg.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,17 +46,17 @@ namespace cfg {
4646
const char* color_bg = "Background color";
4747
const char* color_fg = "Foreground color";
4848
const char* cpu_busy = "CPU utilization";
49-
const char* cpu_busy_percent = "show percentage";
49+
const char* cpu_busy_percent = "Show percentage";
5050
const char* enabled = "Enabled";
5151
const char* fs_read = "Filesystem";
5252
const char* gpu_busy = "GPU utilization";
53-
const char* gpu_busy_percent = "show percentage";
53+
const char* gpu_busy_percent = "Show percentage";
5454
const char* gpu_fps = "Frames per second";
5555
const char* interval = "Update interval";
5656
const char* net_bw = "Network bandwidth";
5757
const char* time = "Time";
58-
const char* time_24h = "format";
59-
const char* toggle_shortcut = "Toggle shortcut";
58+
const char* time_24h = "Format";
59+
const char* toggle_shortcut = "Toggle shortcut";
6060
}
6161

6262

@@ -75,7 +75,7 @@ namespace cfg {
7575
const bool net_bw = true;
7676
const bool time = true;
7777
const bool time_24h = true;
78-
const button_combo toggle_shortcut = wups::config::vpad_combo{
78+
const button_combo toggle_shortcut = wups::config::vpad_buttons{
7979
VPAD_BUTTON_TV | VPAD_BUTTON_LEFT
8080
};
8181
}
@@ -108,6 +108,10 @@ namespace cfg {
108108
defaults::enabled,
109109
"yes", "no"));
110110

111+
root.add(wups::config::button_combo_item::create(labels::toggle_shortcut,
112+
toggle_shortcut,
113+
defaults::toggle_shortcut));
114+
111115
root.add(wups::config::bool_item::create(labels::time,
112116
time,
113117
defaults::time,
@@ -174,10 +178,6 @@ namespace cfg {
174178
100ms, 5000ms,
175179
100ms));
176180

177-
root.add(wups::config::button_combo_item::create(labels::toggle_shortcut,
178-
toggle_shortcut,
179-
defaults::toggle_shortcut));
180-
181181
return WUPSCONFIG_API_CALLBACK_RESULT_SUCCESS;
182182
}
183183

0 commit comments

Comments
 (0)