Prevent inserting the same key multiple times into an input action
This commit is contained in:
@@ -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);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user