Skip to content

Commit

Permalink
fix: crash when doing mouse or keyboard input before main window has …
Browse files Browse the repository at this point in the history
…been created
  • Loading branch information
Silverlan committed Jan 14, 2023
1 parent e314f5c commit 4855962
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions core/client/src/c_engine.cpp
Expand Up @@ -396,6 +396,8 @@ void CEngine::JoystickAxisInput(prosper::Window &window,const GLFW::Joystick &jo
static auto cvAxisInputThreshold = GetClientConVar("cl_controller_axis_input_threshold");
bool CEngine::IsValidAxisInput(float axisInput) const
{
if(!client)
return false;
return (umath::abs(axisInput) > cvAxisInputThreshold->GetFloat()) ? true : false;
}

Expand Down

0 comments on commit 4855962

Please sign in to comment.