|
|
@ -55,6 +55,7 @@ namespace MWInput
|
|
|
|
, mInvertX (Settings::Manager::getBool("invert x axis", "Input"))
|
|
|
|
, mInvertX (Settings::Manager::getBool("invert x axis", "Input"))
|
|
|
|
, mInvertY (Settings::Manager::getBool("invert y axis", "Input"))
|
|
|
|
, mInvertY (Settings::Manager::getBool("invert y axis", "Input"))
|
|
|
|
, mControlsDisabled(false)
|
|
|
|
, mControlsDisabled(false)
|
|
|
|
|
|
|
|
, mJoystickEnabled (Settings::Manager::getBool("enable controller", "Input"))
|
|
|
|
, mCameraSensitivity (Settings::Manager::getFloat("camera sensitivity", "Input"))
|
|
|
|
, mCameraSensitivity (Settings::Manager::getFloat("camera sensitivity", "Input"))
|
|
|
|
, mCameraYMultiplier (Settings::Manager::getFloat("camera y multiplier", "Input"))
|
|
|
|
, mCameraYMultiplier (Settings::Manager::getFloat("camera y multiplier", "Input"))
|
|
|
|
, mPreviewPOVDelay(0.f)
|
|
|
|
, mPreviewPOVDelay(0.f)
|
|
|
@ -659,6 +660,9 @@ namespace MWInput
|
|
|
|
if (it->first == "Input" && it->second == "grab cursor")
|
|
|
|
if (it->first == "Input" && it->second == "grab cursor")
|
|
|
|
mGrabCursor = Settings::Manager::getBool("grab cursor", "Input");
|
|
|
|
mGrabCursor = Settings::Manager::getBool("grab cursor", "Input");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (it->first == "Input" && it->second == "enable controller")
|
|
|
|
|
|
|
|
mJoystickEnabled = Settings::Manager::getBool("enable controller", "Input");
|
|
|
|
|
|
|
|
|
|
|
|
if (it->first == "Video" && (
|
|
|
|
if (it->first == "Video" && (
|
|
|
|
it->second == "resolution x"
|
|
|
|
it->second == "resolution x"
|
|
|
|
|| it->second == "resolution y"
|
|
|
|
|| it->second == "resolution y"
|
|
|
@ -858,6 +862,9 @@ namespace MWInput
|
|
|
|
|
|
|
|
|
|
|
|
void InputManager::buttonPressed(int deviceID, const SDL_ControllerButtonEvent &arg )
|
|
|
|
void InputManager::buttonPressed(int deviceID, const SDL_ControllerButtonEvent &arg )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
if (!mJoystickEnabled)
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
|
|
mJoystickLastUsed = true;
|
|
|
|
mJoystickLastUsed = true;
|
|
|
|
bool guiMode = false;
|
|
|
|
bool guiMode = false;
|
|
|
|
|
|
|
|
|
|
|
@ -892,6 +899,9 @@ namespace MWInput
|
|
|
|
|
|
|
|
|
|
|
|
void InputManager::buttonReleased(int deviceID, const SDL_ControllerButtonEvent &arg )
|
|
|
|
void InputManager::buttonReleased(int deviceID, const SDL_ControllerButtonEvent &arg )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
if (!mJoystickEnabled)
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
|
|
mJoystickLastUsed = true;
|
|
|
|
mJoystickLastUsed = true;
|
|
|
|
if(mInputBinder->detectingBindingState())
|
|
|
|
if(mInputBinder->detectingBindingState())
|
|
|
|
mInputBinder->buttonReleased(deviceID, arg);
|
|
|
|
mInputBinder->buttonReleased(deviceID, arg);
|
|
|
@ -915,7 +925,7 @@ namespace MWInput
|
|
|
|
|
|
|
|
|
|
|
|
void InputManager::axisMoved(int deviceID, const SDL_ControllerAxisEvent &arg )
|
|
|
|
void InputManager::axisMoved(int deviceID, const SDL_ControllerAxisEvent &arg )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (!mControlsDisabled)
|
|
|
|
if (!mControlsDisabled && mJoystickEnabled)
|
|
|
|
mInputBinder->axisMoved(deviceID, arg);
|
|
|
|
mInputBinder->axisMoved(deviceID, arg);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|