InputManager: Adjust scope of constants
This commit is contained in:
parent
3476140ba2
commit
aaf2a4b614
|
@ -33,7 +33,7 @@
|
|||
|
||||
LOG_CHANNEL(InputManager);
|
||||
|
||||
namespace {
|
||||
namespace InputManager {
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// Constants
|
||||
|
@ -41,8 +41,6 @@ namespace {
|
|||
|
||||
enum : u32
|
||||
{
|
||||
MAX_KEYS_PER_BINDING = 4,
|
||||
MAX_MOTORS_PER_PAD = 2,
|
||||
FIRST_EXTERNAL_INPUT_SOURCE = static_cast<u32>(InputSourceType::Pointer) + 1u,
|
||||
LAST_EXTERNAL_INPUT_SOURCE = static_cast<u32>(InputSourceType::Count),
|
||||
};
|
||||
|
@ -55,6 +53,8 @@ enum : u32
|
|||
// all keys go active, and for axis callbacks, when all are active and
|
||||
// the value changes.
|
||||
|
||||
namespace {
|
||||
|
||||
struct InputBinding
|
||||
{
|
||||
InputBindingKey keys[MAX_KEYS_PER_BINDING] = {};
|
||||
|
@ -103,7 +103,6 @@ struct MacroButton
|
|||
// ------------------------------------------------------------------------
|
||||
// Forward Declarations (for static qualifier)
|
||||
// ------------------------------------------------------------------------
|
||||
namespace InputManager {
|
||||
static std::optional<InputBindingKey> ParseHostKeyboardKey(std::string_view source, std::string_view sub_binding);
|
||||
static std::optional<InputBindingKey> ParsePointerKey(std::string_view source, std::string_view sub_binding);
|
||||
static std::optional<InputBindingKey> ParseSensorKey(std::string_view source, std::string_view sub_binding);
|
||||
|
@ -135,7 +134,6 @@ static void UpdateMacroButtons();
|
|||
|
||||
static void UpdateInputSourceState(const SettingsInterface& si, std::unique_lock<std::mutex>& settings_lock,
|
||||
InputSourceType type, std::unique_ptr<InputSource> (*factory_function)());
|
||||
} // namespace InputManager
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// Local Variables
|
||||
|
@ -198,6 +196,8 @@ static bool s_relative_mouse_mode_active = false;
|
|||
static bool s_hide_host_mouse_cursor = false;
|
||||
static bool s_hide_host_mouse_cusor_active = false;
|
||||
|
||||
} // namespace InputManager
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// Binding Parsing
|
||||
// ------------------------------------------------------------------------
|
||||
|
|
|
@ -189,6 +189,13 @@ public:
|
|||
};
|
||||
|
||||
namespace InputManager {
|
||||
|
||||
/// Maximum number of buttons that can be part of a chord.
|
||||
static constexpr u32 MAX_KEYS_PER_BINDING = 4;
|
||||
|
||||
/// Maximum number of output vibration motors per pad.
|
||||
static constexpr u32 MAX_MOTORS_PER_PAD = 2;
|
||||
|
||||
/// Minimum interval between vibration updates when the effect is continuous.
|
||||
static constexpr double VIBRATION_UPDATE_INTERVAL_SECONDS = 0.5; // 500ms
|
||||
|
||||
|
|
Loading…
Reference in New Issue