From 308a71e4a3223f070326467cc6ba444f7d5e3251 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A1szl=C3=B3=20Monda?= Date: Fri, 30 Mar 2018 12:46:30 +0200 Subject: [PATCH] Rename SwitchKeymap() to SwitchKeymapById() --- right/src/keymap.c | 4 ++-- right/src/keymap.h | 2 +- right/src/usb_commands/usb_command_apply_config.c | 4 ++-- right/src/usb_report_updater.c | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/right/src/keymap.c b/right/src/keymap.c index 9422c64..86e9a71 100644 --- a/right/src/keymap.c +++ b/right/src/keymap.c @@ -18,7 +18,7 @@ uint8_t AllKeymapsCount; uint8_t DefaultKeymapIndex; uint8_t CurrentKeymapIndex = 0; -void SwitchKeymap(uint8_t index) +void SwitchKeymapById(uint8_t index) { CurrentKeymapIndex = index; ValidatedUserConfigBuffer.offset = AllKeymaps[index].offset; @@ -31,7 +31,7 @@ bool SwitchKeymapByAbbreviation(uint8_t length, char *abbrev) for (uint8_t i=0; iabbreviationLen == length && strcmp(keymap->abbreviation, abbrev) == 0) { - SwitchKeymap(i); + SwitchKeymapById(i); return true; } } diff --git a/right/src/keymap.h b/right/src/keymap.h index 3a737d2..f17ea83 100644 --- a/right/src/keymap.h +++ b/right/src/keymap.h @@ -29,7 +29,7 @@ // Functions: - void SwitchKeymap(uint8_t index); + void SwitchKeymapById(uint8_t index); bool SwitchKeymapByAbbreviation(uint8_t length, char *abbrev); #endif diff --git a/right/src/usb_commands/usb_command_apply_config.c b/right/src/usb_commands/usb_command_apply_config.c index ede6c99..096e92c 100644 --- a/right/src/usb_commands/usb_command_apply_config.c +++ b/right/src/usb_commands/usb_command_apply_config.c @@ -50,10 +50,10 @@ void UsbCommand_ApplyConfig(void) if (AllKeymaps[keymapId].abbreviationLen == oldKeymapAbbreviationLen && !memcmp(oldKeymapAbbreviation, AllKeymaps[keymapId].abbreviation, oldKeymapAbbreviationLen)) { - SwitchKeymap(keymapId); + SwitchKeymapById(keymapId); return; } } - SwitchKeymap(DefaultKeymapIndex); + SwitchKeymapById(DefaultKeymapIndex); } diff --git a/right/src/usb_report_updater.c b/right/src/usb_report_updater.c index f4b0277..ce26a51 100644 --- a/right/src/usb_report_updater.c +++ b/right/src/usb_report_updater.c @@ -254,7 +254,7 @@ void applyKeyAction(key_state_t *keyState, key_action_t *action) break; case KeyActionType_SwitchKeymap: if (!keyState->previous) { - SwitchKeymap(action->switchKeymap.keymapId); + SwitchKeymapById(action->switchKeymap.keymapId); } break; }