summaryrefslogtreecommitdiffstats
path: root/src/core/ControllerConfig.cpp
diff options
context:
space:
mode:
authorerorcun <erorcunerorcun@hotmail.com.tr>2020-12-15 03:51:53 +0100
committererorcun <erorcunerorcun@hotmail.com.tr>2020-12-15 03:51:53 +0100
commit984b8efccc844588d8d7ddfd94713dee5ac90fc7 (patch)
treeef2e3301ab96eeb3f2ce97eb14b3102af56062bd /src/core/ControllerConfig.cpp
parentMerge pull request #882 from GTAmodding/ShFil119-patch-1 (diff)
downloadre3-984b8efccc844588d8d7ddfd94713dee5ac90fc7.tar
re3-984b8efccc844588d8d7ddfd94713dee5ac90fc7.tar.gz
re3-984b8efccc844588d8d7ddfd94713dee5ac90fc7.tar.bz2
re3-984b8efccc844588d8d7ddfd94713dee5ac90fc7.tar.lz
re3-984b8efccc844588d8d7ddfd94713dee5ac90fc7.tar.xz
re3-984b8efccc844588d8d7ddfd94713dee5ac90fc7.tar.zst
re3-984b8efccc844588d8d7ddfd94713dee5ac90fc7.zip
Diffstat (limited to 'src/core/ControllerConfig.cpp')
-rw-r--r--src/core/ControllerConfig.cpp46
1 files changed, 46 insertions, 0 deletions
diff --git a/src/core/ControllerConfig.cpp b/src/core/ControllerConfig.cpp
index cadba7f2..b56a19f0 100644
--- a/src/core/ControllerConfig.cpp
+++ b/src/core/ControllerConfig.cpp
@@ -1718,6 +1718,52 @@ void CControllerConfigManager::DeleteMatching1rstPersonControls(e_ControllerActi
#undef CLEAR_ACTION_IF_NEEDED
+#ifdef RADIO_SCROLL_TO_PREV_STATION
+#define CHECK_ACTION(action) \
+if (key == GetControllerKeyAssociatedWithAction(action, type))\
+ return true;
+
+bool CControllerConfigManager::IsAnyVehicleActionAssignedToMouseKey(int32 key)
+{
+ const eControllerType type = MOUSE;
+ if (!GetIsKeyBlank(key, type))
+ {
+#ifdef BIND_VEHICLE_FIREWEAPON
+ CHECK_ACTION(VEHICLE_FIREWEAPON);
+#endif
+ CHECK_ACTION(VEHICLE_LOOKBEHIND);
+ CHECK_ACTION(VEHICLE_LOOKLEFT);
+ CHECK_ACTION(VEHICLE_LOOKRIGHT);
+ CHECK_ACTION(VEHICLE_LOOKBEHIND); // note: duplicate
+ CHECK_ACTION(VEHICLE_HORN);
+ CHECK_ACTION(VEHICLE_HANDBRAKE);
+ CHECK_ACTION(VEHICLE_ACCELERATE);
+ CHECK_ACTION(VEHICLE_BRAKE);
+ CHECK_ACTION(VEHICLE_CHANGE_RADIO_STATION);
+ CHECK_ACTION(TOGGLE_SUBMISSIONS);
+ CHECK_ACTION(VEHICLE_TURRETLEFT);
+ CHECK_ACTION(VEHICLE_TURRETRIGHT);
+ CHECK_ACTION(VEHICLE_TURRETUP);
+ CHECK_ACTION(VEHICLE_TURRETDOWN);
+ CHECK_ACTION(VEHICLE_ENTER_EXIT);
+ CHECK_ACTION(CAMERA_CHANGE_VIEW_ALL_SITUATIONS);
+#ifndef BIND_VEHICLE_FIREWEAPON
+ CHECK_ACTION(PED_FIREWEAPON);
+#endif
+ CHECK_ACTION(GO_LEFT);
+ CHECK_ACTION(GO_RIGHT);
+ CHECK_ACTION(NETWORK_TALK);
+ CHECK_ACTION(SWITCH_DEBUG_CAM_ON);
+ CHECK_ACTION(TOGGLE_DPAD);
+ CHECK_ACTION(TAKE_SCREEN_SHOT);
+ CHECK_ACTION(SHOW_MOUSE_POINTER_TOGGLE);
+ }
+ return false;
+}
+
+#undef CHECK_ACTION
+#endif
+
void CControllerConfigManager::DeleteMatchingActionInitiators(e_ControllerAction action, int32 key, eControllerType type)
{
if (!GetIsKeyBlank(key, type))