Skip to content
Snippets Groups Projects
Commit f8865196 authored by Ali Can Demiralp's avatar Ali Can Demiralp
Browse files

Initializing value/pressed/released to avoid release bugs.

parent 6c233bcc
Branches
Tags
No related merge requests found
......@@ -70,7 +70,7 @@ void FDisplayClusterInputDevice::SendControllerEvents()
{
for (auto j = 0; j < AxisIndices.Num(); ++j)
{
float Value;
float Value = 0.0f;
InputManager->GetAxis(AxisDeviceIds[i], j, Value);
if (Value != 0.0f) MessageHandler->OnControllerAnalog(AxisIndices[j]->GetFName(), i, Value);
}
......@@ -82,7 +82,7 @@ void FDisplayClusterInputDevice::SendControllerEvents()
{
for (auto j = 0; j < ButtonIndices.Num(); ++j)
{
bool Pressed, Released;
bool Pressed = false, Released = false;
InputManager->WasButtonPressed (ButtonDeviceIds[i], j, Pressed );
InputManager->WasButtonReleased(ButtonDeviceIds[i], j, Released);
if (Pressed ) MessageHandler->OnControllerButtonPressed (ButtonIndices[j]->GetFName(), i, false);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment