mirror of
https://github.com/elasota/Aerofoil.git
synced 2025-09-23 14:53:52 +00:00
Event queue refactor
This commit is contained in:
24
PortabilityLayer/PLTimeTaggedVOSEvent.h
Normal file
24
PortabilityLayer/PLTimeTaggedVOSEvent.h
Normal file
@@ -0,0 +1,24 @@
|
||||
#pragma once
|
||||
|
||||
#include "GpVOSEvent.h"
|
||||
|
||||
struct TimeTaggedVOSEvent
|
||||
{
|
||||
GpVOSEvent m_vosEvent;
|
||||
uint32_t m_timestamp;
|
||||
|
||||
static TimeTaggedVOSEvent Create(const GpVOSEvent &vosEvent, uint32_t timestamp);
|
||||
|
||||
// Helpers for common cases
|
||||
bool IsKeyDownEvent() const;
|
||||
bool IsLMouseDownEvent() const;
|
||||
};
|
||||
|
||||
inline TimeTaggedVOSEvent TimeTaggedVOSEvent::Create(const GpVOSEvent &vosEvent, uint32_t timestamp)
|
||||
{
|
||||
TimeTaggedVOSEvent result;
|
||||
result.m_vosEvent = vosEvent;
|
||||
result.m_timestamp = timestamp;
|
||||
|
||||
return result;
|
||||
}
|
Reference in New Issue
Block a user