Com EventLoop

Com_EventLoop() repeatedly retrieves a Template:TypeDoc via Com_GetEvent() → Com_GetRealEvent() → Sys_GetEvent() (unix link and Windows link) in an infinite loop. For each event returned, it invokes this pseudo-switch statement, based on the type of the event: