Fix issue where only first bound button was considered
This commit is contained in:
@@ -69,7 +69,7 @@ namespace OpenVulkano::Input
|
|||||||
for (const KeyBinding binding : action->GetKeys())
|
for (const KeyBinding binding : action->GetKeys())
|
||||||
{
|
{
|
||||||
if (binding.key.GetInputDeviceType() != device->GetType()) continue;
|
if (binding.key.GetInputDeviceType() != device->GetType()) continue;
|
||||||
return device->GetButton(binding.key);
|
if (device->GetButton(binding.key)) return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
@@ -82,11 +82,8 @@ namespace OpenVulkano::Input
|
|||||||
{
|
{
|
||||||
for (const KeyBinding binding : action->GetKeys())
|
for (const KeyBinding binding : action->GetKeys())
|
||||||
{
|
{
|
||||||
if (binding.key.GetInputDeviceType() != device->GetType())
|
if (binding.key.GetInputDeviceType() != device->GetType()) continue;
|
||||||
{
|
if (device->GetButtonDown(binding.key)) return true;
|
||||||
continue;
|
|
||||||
}
|
|
||||||
return device->GetButtonDown(binding.key);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
@@ -99,11 +96,8 @@ namespace OpenVulkano::Input
|
|||||||
{
|
{
|
||||||
for (const KeyBinding binding : action->GetKeys())
|
for (const KeyBinding binding : action->GetKeys())
|
||||||
{
|
{
|
||||||
if (binding.key.GetInputDeviceType() != device->GetType())
|
if (binding.key.GetInputDeviceType() != device->GetType()) continue;
|
||||||
{
|
if (device->GetButtonUp(binding.key)) return true;
|
||||||
continue;
|
|
||||||
}
|
|
||||||
return device->GetButtonUp(binding.key);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
@@ -114,7 +108,7 @@ namespace OpenVulkano::Input
|
|||||||
for(const InputDevice* device : devices)
|
for(const InputDevice* device : devices)
|
||||||
{
|
{
|
||||||
if (key.GetInputDeviceType() != device->GetType()) continue;
|
if (key.GetInputDeviceType() != device->GetType()) continue;
|
||||||
return device->GetButton(key);
|
if (device->GetButton(key)) return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -124,7 +118,7 @@ namespace OpenVulkano::Input
|
|||||||
for(const InputDevice* device : devices)
|
for(const InputDevice* device : devices)
|
||||||
{
|
{
|
||||||
if (key.GetInputDeviceType() != device->GetType()) continue;
|
if (key.GetInputDeviceType() != device->GetType()) continue;
|
||||||
return device->GetButtonUp(key);
|
if (device->GetButtonUp(key)) return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -134,7 +128,7 @@ namespace OpenVulkano::Input
|
|||||||
for(const InputDevice* device : devices)
|
for(const InputDevice* device : devices)
|
||||||
{
|
{
|
||||||
if (key.GetInputDeviceType() != device->GetType()) continue;
|
if (key.GetInputDeviceType() != device->GetType()) continue;
|
||||||
return device->GetButtonDown(key);
|
if (device->GetButtonDown(key)) return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user