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) {
|
||||
auto hContext = PropGet(PROP_EVENTCONTEXT);
|
||||
auto contextId = *reinterpret_cast<uint32_t*>(hContext);
|
||||
int32_t findMask;
|
||||
|
||||
int32_t findMask;
|
||||
auto context = TSingletonInstanceId<EvtContext, offsetof(EvtContext, m_id)>::s_idTable.Ptr(
|
||||
contextId,
|
||||
0,
|
||||
&findMask
|
||||
);
|
||||
|
||||
if (context) {
|
||||
if (!context) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
auto keystate = IEvtQueueCheckSyncKeyState(context, key);
|
||||
|
||||
if (findMask != -1) {
|
||||
@ -75,8 +78,6 @@ int32_t EventIsKeyDown(KEY key) {
|
||||
|
||||
return keystate;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t EventIsShiftKeyDown() {
|
||||
return EventIsKeyDown(KEY_LSHIFT) || EventIsKeyDown(KEY_RSHIFT);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user