mirror of
https://github.com/ZDoom/Raze.git
synced 2025-01-31 12:30:40 +00:00
- InputState::AddEvent()
: Partially revert changes performed in 4d629e7de8
that were believed not necessary. This functionality is still needed in some of Exhumed's cutscenes that are performed in-engine and not as a screenjob.
This commit is contained in:
parent
4d629e7de8
commit
1228cb6044
1 changed files with 19 additions and 1 deletions
|
@ -80,14 +80,32 @@ void InputState::GetMouseDelta(ControlInfo * hidInput)
|
||||||
//
|
//
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
|
||||||
|
static int exclKeys[] = { KEY_VOLUMEDOWN, KEY_VOLUMEUP };
|
||||||
|
|
||||||
void InputState::AddEvent(const event_t *ev)
|
void InputState::AddEvent(const event_t *ev)
|
||||||
{
|
{
|
||||||
if (ev->type == EV_KeyDown || ev->type == EV_KeyUp)
|
if (ev->type == EV_KeyDown || ev->type == EV_KeyUp)
|
||||||
{
|
{
|
||||||
int key = ev->data1;
|
int key = ev->data1;
|
||||||
bool state = ev->type == EV_KeyDown;
|
bool state = ev->type == EV_KeyDown;
|
||||||
|
bool ignore = false;
|
||||||
KeyStatus[key] = (uint8_t)state;
|
KeyStatus[key] = (uint8_t)state;
|
||||||
if (state && !(key > KEY_LASTJOYBUTTON && key < KEY_PAD_LTHUMB_RIGHT))
|
|
||||||
|
// Check if key is to be excluded from setting AnyKeyStatus.
|
||||||
|
for (int i = 0; i < 2; i++)
|
||||||
|
{
|
||||||
|
if (exclKeys[i] == key)
|
||||||
|
{
|
||||||
|
ignore = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (key > KEY_LASTJOYBUTTON && key < KEY_PAD_LTHUMB_RIGHT)
|
||||||
|
{
|
||||||
|
ignore = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (state && !ignore)
|
||||||
AnyKeyStatus = true;
|
AnyKeyStatus = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue