Patch - Adds utility and improves error handling - V14.5.31

Adds a utility function to retrieve key states for a given container of keys, enhancing input processing capabilities.

Improves error handling by adding more logging for render failures, giving the development team better insights into potential issues and aiding debugging efforts.
This commit is contained in:
2025-10-10 12:46:13 +02:00
parent 00339aa6c2
commit 7c6562719f
4 changed files with 25 additions and 39 deletions

View File

@@ -25,6 +25,17 @@
class input_class
{
public:
template<typename Container>
std::vector<bool> get_key_states(const Container& key) const
{
std::vector<bool> key_states;
key_states.reserve(key.size());
for (auto k : key)
key_states.push_back(this->is_key_pressed(k));
return key_states;
}
input_class();
input_class(const input_class&);
~input_class();
@@ -48,6 +59,8 @@ public:
bool IsKeyDown(unsigned int) const;
bool is_key_pressed(const unsigned int);
private:
bool m_keys[256];