- Fix issue with memset calls from 0eba341ac1.

This commit is contained in:
Mitchell Richters 2023-04-05 07:16:19 +10:00
parent 6403c7291f
commit 3951407b68
4 changed files with 8 additions and 8 deletions

View file

@ -1202,7 +1202,7 @@ void I_GetJoysticks(TArray<IJoystickConfig*>& sticks)
void I_GetAxes(float axes[NUM_JOYAXIS])
{
memset(axes, 0, sizeof(axes));
memset(axes, 0, sizeof(float) * NUM_JOYAXIS);
if (use_joystick && NULL != s_joystickManager)
{

View file

@ -324,7 +324,7 @@ void I_GetJoysticks(TArray<IJoystickConfig *> &sticks)
void I_GetAxes(float axes[NUM_JOYAXIS])
{
memset(axes, 0, sizeof(axes));
memset(axes, 0, sizeof(float) * NUM_JOYAXIS);
if (use_joystick && JoystickManager)
{

View file

@ -635,7 +635,7 @@ void I_StartFrame ()
void I_GetAxes(float axes[NUM_JOYAXIS])
{
memset(axes, 0, sizeof(axes));
memset(axes, 0, sizeof(float) * NUM_JOYAXIS);
if (use_joystick)
{

View file

@ -436,11 +436,6 @@ void Display()
screen->BeginFrame();
screen->SetSceneRenderTarget(gl_ssao != 0);
//updateModelInterpolation();
if (!SyncInput())
{
I_GetEvent();
gameInput.getInput(inputScale);
}
gi->Render();
DrawFullscreenBlends();
drawMapTitle();
@ -608,6 +603,11 @@ void TryRunTics (void)
gi->Predict(myconnectindex);
#endif
}
if (!SyncInput())
{
I_GetEvent();
gameInput.getInput(inputScale);
}
return;
}