mirror of
https://github.com/whoahq/whoa.git
synced 2026-02-02 08:42:45 +03:00
chore(event): tweak code style
This commit is contained in:
parent
c3813f9d88
commit
605cbda69d
@ -55,15 +55,18 @@ int32_t EventIsControlKeyDown() {
|
|||||||
int32_t EventIsKeyDown(KEY key) {
|
int32_t EventIsKeyDown(KEY key) {
|
||||||
auto hContext = PropGet(PROP_EVENTCONTEXT);
|
auto hContext = PropGet(PROP_EVENTCONTEXT);
|
||||||
auto contextId = *reinterpret_cast<uint32_t*>(hContext);
|
auto contextId = *reinterpret_cast<uint32_t*>(hContext);
|
||||||
int32_t findMask;
|
|
||||||
|
|
||||||
|
int32_t findMask;
|
||||||
auto context = TSingletonInstanceId<EvtContext, offsetof(EvtContext, m_id)>::s_idTable.Ptr(
|
auto context = TSingletonInstanceId<EvtContext, offsetof(EvtContext, m_id)>::s_idTable.Ptr(
|
||||||
contextId,
|
contextId,
|
||||||
0,
|
0,
|
||||||
&findMask
|
&findMask
|
||||||
);
|
);
|
||||||
|
|
||||||
if (context) {
|
if (!context) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
auto keystate = IEvtQueueCheckSyncKeyState(context, key);
|
auto keystate = IEvtQueueCheckSyncKeyState(context, key);
|
||||||
|
|
||||||
if (findMask != -1) {
|
if (findMask != -1) {
|
||||||
@ -74,8 +77,6 @@ int32_t EventIsKeyDown(KEY key) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return keystate;
|
return keystate;
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t EventIsShiftKeyDown() {
|
int32_t EventIsShiftKeyDown() {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user