Prevent inserting the same key multiple times into an input action

This commit is contained in:
2023-10-17 19:54:32 +02:00
parent 5b404efa74
commit aa7eade85e
2 changed files with 26 additions and 0 deletions

View File

@@ -309,5 +309,15 @@ namespace OpenVulkano::Input
[[nodiscard]] InputType GetInputType() const { return type; }
[[nodiscard]] int16_t GetInputKey() const { return key; }
bool operator==(const InputKey& other)
{
return deviceType == other.deviceType && type == other.type && key == other.key;
}
bool operator!=(const InputKey& other)
{
return !(*this == other);
}
};
}