Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
modified:   src/managers/KeybindManager.cpp
modified:   src/managers/KeybindManager.hpp
  • Loading branch information
MightyPlaza committed Nov 17, 2024
1 parent afc45a5 commit 361ae19
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
19 changes: 9 additions & 10 deletions src/managers/KeybindManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,19 +147,18 @@ CKeybindManager::CKeybindManager() {
m_pRepeatKeyTimer = makeShared<CEventLoopTimer>(
std::nullopt,
[this](SP<CEventLoopTimer> self, void* data) {
if (m_vActiveKeybinds.size() == 0 || g_pSeatManager->keyboard.expired())
return;

if (m_vActiveKeybinds.size() == 0 || g_pSeatManager->keyboard.expired())
return;

for (SKeybind* k : m_vActiveKeybinds) {
const auto DISPATCHER = g_pKeybindManager->m_mDispatchers.find(k->handler);
for (SKeybind* k : m_vActiveKeybinds) {
const auto DISPATCHER = g_pKeybindManager->m_mDispatchers.find(k->handler);

Debug::log(LOG, "Keybind repeat triggered, calling dispatcher.");
DISPATCHER->second(k->arg);
}
Debug::log(LOG, "Keybind repeat triggered, calling dispatcher.");
DISPATCHER->second(k->arg);
}

const auto PACTIVEKEEB = g_pSeatManager->keyboard.lock();
self->updateTimeout(std::chrono::milliseconds(1000 / PACTIVEKEEB->repeatRate));
const auto PACTIVEKEEB = g_pSeatManager->keyboard.lock();
self->updateTimeout(std::chrono::milliseconds(1000 / PACTIVEKEEB->repeatRate));
},
nullptr);

Expand Down
2 changes: 1 addition & 1 deletion src/managers/KeybindManager.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ class CKeybindManager {
inline static std::string m_szCurrentSelectedSubmap = "";

std::vector<SKeybind*> m_vActiveKeybinds;
SKeybind * m_pLastLongPressKeybind = nullptr;
SKeybind* m_pLastLongPressKeybind = nullptr;
SP<CEventLoopTimer> m_pLongPressTimer, m_pRepeatKeyTimer;

uint32_t m_uTimeLastMs = 0;
Expand Down

0 comments on commit 361ae19

Please sign in to comment.