- InputState: Make CONTROL_GetInput() return an object instead of accepting a pointer and provide to games as a function parameter.

* Provide read-only/const results from `CONTROL_GetInput()` so games can't change received input.
* Change non-descript `info` to `hidInput` (Human Interface Device).
* Remove a few unused prototypes.
This commit is contained in:
Mitchell Richters 2020-09-06 20:17:54 +10:00
parent 677efb20ba
commit 722537a1f0
16 changed files with 102 additions and 116 deletions

View file

@ -110,7 +110,7 @@ int gametic;
void G_BuildTiccmd(ticcmd_t* cmd)
{
I_GetEvent();
gi->GetInput(&cmd->ucmd);
gi->GetInput(&cmd->ucmd, &CONTROL_GetInput());
cmd->consistancy = consistancy[myconnectindex][(maketic / ticdup) % BACKUPTICS];
}
@ -491,7 +491,7 @@ void TryRunTics (void)
if (!cl_syncinput)
{
I_GetEvent();
gi->GetInput(nullptr);
gi->GetInput(nullptr, &CONTROL_GetInput());
}
return;
}