MessageQueue write time to current message not the next
This commit is contained in:
parent
733026dada
commit
8515846317
@ -100,12 +100,13 @@ BOOL MessageQueue_Dispatch(wMessageQueue* queue, wMessage* message)
|
|||||||
}
|
}
|
||||||
|
|
||||||
CopyMemory(&(queue->array[queue->tail]), message, sizeof(wMessage));
|
CopyMemory(&(queue->array[queue->tail]), message, sizeof(wMessage));
|
||||||
queue->tail = (queue->tail + 1) % queue->capacity;
|
|
||||||
queue->size++;
|
|
||||||
|
|
||||||
message = &(queue->array[queue->tail]);
|
message = &(queue->array[queue->tail]);
|
||||||
message->time = GetTickCount64();
|
message->time = GetTickCount64();
|
||||||
|
|
||||||
|
queue->tail = (queue->tail + 1) % queue->capacity;
|
||||||
|
queue->size++;
|
||||||
|
|
||||||
if (queue->size > 0)
|
if (queue->size > 0)
|
||||||
SetEvent(queue->event);
|
SetEvent(queue->event);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user