mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-14 00:21:34 +00:00
- D_ProcessEvents()
: Fix bad setup with delayedevents
array that was holding pointers to items in the events[]
array instead of making a copy.
This commit is contained in:
parent
c4f7760ab2
commit
b1fea228be
1 changed files with 3 additions and 3 deletions
|
@ -68,7 +68,7 @@ CVAR(Bool, m_filter, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
||||||
void D_ProcessEvents (void)
|
void D_ProcessEvents (void)
|
||||||
{
|
{
|
||||||
bool keywasdown[NUM_KEYS] = { false };
|
bool keywasdown[NUM_KEYS] = { false };
|
||||||
TArray<event_t*> delayedevents;
|
TArray<event_t> delayedevents;
|
||||||
|
|
||||||
while (eventtail != eventhead)
|
while (eventtail != eventhead)
|
||||||
{
|
{
|
||||||
|
@ -77,7 +77,7 @@ void D_ProcessEvents (void)
|
||||||
|
|
||||||
if (ev->type == EV_KeyUp && keywasdown[ev->data1])
|
if (ev->type == EV_KeyUp && keywasdown[ev->data1])
|
||||||
{
|
{
|
||||||
delayedevents.Push(ev);
|
delayedevents.Push(*ev);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -99,7 +99,7 @@ void D_ProcessEvents (void)
|
||||||
|
|
||||||
for (auto& ev: delayedevents)
|
for (auto& ev: delayedevents)
|
||||||
{
|
{
|
||||||
D_PostEvent(ev);
|
D_PostEvent(&ev);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue