Skip to content

Commit

Permalink
[input] Fix missing negation in was_key_pressed_once function
Browse files Browse the repository at this point in the history
  • Loading branch information
yeetari committed Jul 19, 2021
1 parent 3bcc459 commit f91b719
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/vulkan-renderer/input/keyboard_mouse_data.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ bool KeyboardMouseInputData::is_key_pressed(const std::int32_t key) const {
bool KeyboardMouseInputData::was_key_pressed_once(const std::int32_t key) {
assert(key < GLFW_KEY_LAST);
std::scoped_lock lock(m_input_mutex);
if (m_pressed_keys[key] || !m_keyboard_updated) {
if (!m_pressed_keys[key] || !m_keyboard_updated) {
return false;
}
m_pressed_keys[key] = false;
Expand Down

0 comments on commit f91b719

Please sign in to comment.