Skip to content

Commit

Permalink
- Moved shortcut and wpad button handling to libwups.
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel K. O. (dkosmari) committed Sep 2, 2024
1 parent f9f32f1 commit af817d2
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 337 deletions.
18 changes: 9 additions & 9 deletions src/cfg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,17 @@ namespace cfg {
const char* color_bg = "Background color";
const char* color_fg = "Foreground color";
const char* cpu_busy = "CPU utilization";
const char* cpu_busy_percent = "show percentage";
const char* cpu_busy_percent = "Show percentage";
const char* enabled = "Enabled";
const char* fs_read = "Filesystem";
const char* gpu_busy = "GPU utilization";
const char* gpu_busy_percent = "show percentage";
const char* gpu_busy_percent = "Show percentage";
const char* gpu_fps = "Frames per second";
const char* interval = "Update interval";
const char* net_bw = "Network bandwidth";
const char* time = "Time";
const char* time_24h = "format";
const char* toggle_shortcut = "Toggle shortcut";
const char* time_24h = "Format";
const char* toggle_shortcut = "Toggle shortcut";
}


Expand All @@ -75,7 +75,7 @@ namespace cfg {
const bool net_bw = true;
const bool time = true;
const bool time_24h = true;
const button_combo toggle_shortcut = wups::config::vpad_combo{
const button_combo toggle_shortcut = wups::config::vpad_buttons{
VPAD_BUTTON_TV | VPAD_BUTTON_LEFT
};
}
Expand Down Expand Up @@ -108,6 +108,10 @@ namespace cfg {
defaults::enabled,
"yes", "no"));

root.add(wups::config::button_combo_item::create(labels::toggle_shortcut,
toggle_shortcut,
defaults::toggle_shortcut));

root.add(wups::config::bool_item::create(labels::time,
time,
defaults::time,
Expand Down Expand Up @@ -174,10 +178,6 @@ namespace cfg {
100ms, 5000ms,
100ms));

root.add(wups::config::button_combo_item::create(labels::toggle_shortcut,
toggle_shortcut,
defaults::toggle_shortcut));

return WUPSCONFIG_API_CALLBACK_RESULT_SUCCESS;
}

Expand Down
Loading

0 comments on commit af817d2

Please sign in to comment.