diff --git a/plugins/onepad/Linux/JoystickConfiguration.cpp b/plugins/onepad/Linux/JoystickConfiguration.cpp index c17f867d19..3a39047893 100644 --- a/plugins/onepad/Linux/JoystickConfiguration.cpp +++ b/plugins/onepad/Linux/JoystickConfiguration.cpp @@ -33,6 +33,12 @@ JoystickConfiguration::JoystickConfiguration(int pad, bool left, wxWindow *paren wxCLOSE_BOX | wxCLIP_CHILDREN) { + m_init_reverse_Lx = false; + m_init_reverse_Ly = false; + m_init_reverse_Rx = false; + m_init_reverse_Ry = false; + m_init_mouse_Ljoy = false; + m_init_mouse_Rjoy = false; m_pad_id = pad; m_isForLeftJoystick = left; @@ -64,6 +70,10 @@ JoystickConfiguration::JoystickConfiguration(int pad, bool left, wxWindow *paren _T("Use mouse for left analog joystick"), // Label wxPoint(20, 60) // Position ); + + m_cb_reverse_Rx = nullptr; + m_cb_reverse_Ry = nullptr; + m_cb_mouse_Rjoy = nullptr; } else { m_cb_reverse_Rx = new wxCheckBox( m_pan_joystick_config, // Parent @@ -85,6 +95,10 @@ JoystickConfiguration::JoystickConfiguration(int pad, bool left, wxWindow *paren _T("Use mouse for right analog joystick"), // Label wxPoint(20, 60) // Position ); + + m_cb_reverse_Lx = nullptr; + m_cb_reverse_Ly = nullptr; + m_cb_mouse_Ljoy = nullptr; } m_bt_ok = new wxButton( diff --git a/plugins/onepad/SDL/joystick.h b/plugins/onepad/SDL/joystick.h index 6890713173..fe76c38a3e 100644 --- a/plugins/onepad/SDL/joystick.h +++ b/plugins/onepad/SDL/joystick.h @@ -36,11 +36,13 @@ class JoystickInfo : GamePad public: JoystickInfo() : GamePad() - , joy(NULL) + , joy(nullptr) { #if SDL_MAJOR_VERSION >= 2 - haptic = NULL; + haptic = nullptr; first = true; + memset(effects, 0, sizeof(effects)); + memset(effects_id, 0, sizeof(effects_id)); #endif }