the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
1#include "stdafx.h"
2#include "InputConstraint.h"
3
4bool InputConstraint::isMappingConstrained(int iPad, int mapping)
5{
6 // If it's a menu button, then we ignore all inputs
7 if((m_inputMapping == mapping) || (mapping < ACTION_MAX_MENU))
8 {
9 return true;
10 }
11
12 // Otherwise see if they map to the same actual button
13 unsigned char layoutMapping = InputManager.GetJoypadMapVal( iPad );
14
15 // 4J HEG - Replaced the equivalance test with bitwise AND, important in some mapping configurations
16 // (e.g. when comparing two action map values and one has extra buttons mapped)
17 return (InputManager.GetGameJoypadMaps(layoutMapping,m_inputMapping) & InputManager.GetGameJoypadMaps(layoutMapping,mapping)) > 0;
18}