mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 00:42:08 +00:00
- Remove GameInput::prepareHidInput()
and GameInput::resetHidInput()
.
* Also reverts 23bff9f701
, but changes the loop into a `memset()` call instead.
This commit is contained in:
parent
d454455d22
commit
0eba341ac1
5 changed files with 8 additions and 21 deletions
|
@ -1202,6 +1202,8 @@ void I_GetJoysticks(TArray<IJoystickConfig*>& sticks)
|
|||
|
||||
void I_GetAxes(float axes[NUM_JOYAXIS])
|
||||
{
|
||||
memset(axes, 0, sizeof(axes));
|
||||
|
||||
if (use_joystick && NULL != s_joystickManager)
|
||||
{
|
||||
s_joystickManager->AddAxes(axes);
|
||||
|
|
|
@ -324,6 +324,8 @@ void I_GetJoysticks(TArray<IJoystickConfig *> &sticks)
|
|||
|
||||
void I_GetAxes(float axes[NUM_JOYAXIS])
|
||||
{
|
||||
memset(axes, 0, sizeof(axes));
|
||||
|
||||
if (use_joystick && JoystickManager)
|
||||
{
|
||||
JoystickManager->AddAxes(axes);
|
||||
|
|
|
@ -635,6 +635,8 @@ void I_StartFrame ()
|
|||
|
||||
void I_GetAxes(float axes[NUM_JOYAXIS])
|
||||
{
|
||||
memset(axes, 0, sizeof(axes));
|
||||
|
||||
if (use_joystick)
|
||||
{
|
||||
for (unsigned i = 0; i < NUM_JOYDEVICES; ++i)
|
||||
|
|
|
@ -219,23 +219,6 @@ void GameInput::processVehicle(PlayerAngles* const plrAngles, const float scaleA
|
|||
}
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
// Prepares received backend input for use throughout class.
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void GameInput::prepareHidInput()
|
||||
{
|
||||
I_GetAxes(joyAxes);
|
||||
}
|
||||
|
||||
void GameInput::resetHidInput()
|
||||
{
|
||||
memset(joyAxes, 0, sizeof(joyAxes));
|
||||
mouseInput.Zero();
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
// Processes all the input bits.
|
||||
|
@ -345,10 +328,10 @@ void GameInput::getInput(const double scaleAdjust, InputPacket* packet)
|
|||
return;
|
||||
}
|
||||
|
||||
prepareHidInput();
|
||||
I_GetAxes(joyAxes);
|
||||
processInputBits();
|
||||
gi->doPlayerMovement(!SyncInput() ? (float)scaleAdjust : 1.f);
|
||||
resetHidInput();
|
||||
mouseInput.Zero();
|
||||
|
||||
if (packet)
|
||||
{
|
||||
|
|
|
@ -42,8 +42,6 @@ class GameInput
|
|||
|
||||
// Prototypes for private member functions.
|
||||
void processInputBits();
|
||||
void prepareHidInput();
|
||||
void resetHidInput();
|
||||
|
||||
public:
|
||||
// Bit sender updates.
|
||||
|
|
Loading…
Reference in a new issue