fix broken key bindings

This commit is contained in:
ohyzha
2024-07-16 13:32:08 +03:00
parent 28f48377d5
commit 5e7cf1ba90
2 changed files with 3 additions and 3 deletions

View File

@@ -48,7 +48,7 @@ namespace OpenVulkano::GLFW
{
remappedKey = i - 320;
}
else if (i >= GLFW_KEY_NUM_LOCK)
else if (i == GLFW_KEY_NUM_LOCK)
{
remappedKey = 17;
}

View File

@@ -69,7 +69,7 @@ namespace OpenVulkano::Input
for (const KeyBinding binding : action->GetKeys())
{
if (binding.key.GetInputDeviceType() != device->GetType()) continue;
if (device->GetButton(binding.key)) return true;
return device->GetButton(binding.key);
}
}
return false;
@@ -80,7 +80,7 @@ namespace OpenVulkano::Input
for(const InputDevice* device : devices)
{
if (key.GetInputDeviceType() != device->GetType()) continue;
if (device->GetButton(key)) return true;
return device->GetButton(key);
}
return false;
}