summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2021-01-24 21:22:16 +0100
committerSergeanur <s.anureev@yandex.ua>2021-01-24 21:22:16 +0100
commit0ad1426950148f44d8e595a703787254d45b956f (patch)
treef819475b9ab496f437a1f7359e4d3fa2db2afb11 /src/core
parentMerge pull request #987 from Sergeanur/lcsHud (diff)
parentPed: car enter anim. fix (diff)
downloadre3-0ad1426950148f44d8e595a703787254d45b956f.tar
re3-0ad1426950148f44d8e595a703787254d45b956f.tar.gz
re3-0ad1426950148f44d8e595a703787254d45b956f.tar.bz2
re3-0ad1426950148f44d8e595a703787254d45b956f.tar.lz
re3-0ad1426950148f44d8e595a703787254d45b956f.tar.xz
re3-0ad1426950148f44d8e595a703787254d45b956f.tar.zst
re3-0ad1426950148f44d8e595a703787254d45b956f.zip
Diffstat (limited to 'src/core')
-rw-r--r--src/core/ControllerConfig.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/core/ControllerConfig.cpp b/src/core/ControllerConfig.cpp
index fcc4503a..64663b81 100644
--- a/src/core/ControllerConfig.cpp
+++ b/src/core/ControllerConfig.cpp
@@ -2755,9 +2755,10 @@ wchar *CControllerConfigManager::GetButtonComboText(e_ControllerAction action)
void CControllerConfigManager::SetControllerKeyAssociatedWithAction(e_ControllerAction action, int32 key, eControllerType type)
{
ResetSettingOrder(action);
+ int numOfSettings = GetNumOfSettingsForAction(action);
m_aSettings[action][type].m_Key = key;
- m_aSettings[action][type].m_ContSetOrder = GetNumOfSettingsForAction(action) + 1;
+ m_aSettings[action][type].m_ContSetOrder = numOfSettings + 1;
}
int32 CControllerConfigManager::GetMouseButtonAssociatedWithAction(e_ControllerAction action)
@@ -2767,8 +2768,10 @@ int32 CControllerConfigManager::GetMouseButtonAssociatedWithAction(e_ControllerA
void CControllerConfigManager::SetMouseButtonAssociatedWithAction(e_ControllerAction action, int32 button)
{
+ int numOfSettings = GetNumOfSettingsForAction(action);
+
m_aSettings[action][MOUSE].m_Key = button;
- m_aSettings[action][MOUSE].m_ContSetOrder = GetNumOfSettingsForAction(action) + 1;
+ m_aSettings[action][MOUSE].m_ContSetOrder = numOfSettings + 1;
}
void CControllerConfigManager::ResetSettingOrder(e_ControllerAction action)