Allow mapping half axes to buttons

This allows to bind pressure sensitive NeGcon buttons to keyboard,
mouse and controller buttons
This commit is contained in:
Silent
2020-08-29 14:19:28 +02:00
parent 79aaf908a6
commit 057bf986c4
17 changed files with 306 additions and 171 deletions

View File

@ -1,5 +1,6 @@
#pragma once
#include "common/string.h"
#include "core/controller.h"
#include "core/host_interface.h"
#include <atomic>
#include <functional>
@ -195,7 +196,8 @@ protected:
virtual bool AddButtonToInputMap(const std::string& binding, const std::string_view& device,
const std::string_view& button, InputButtonHandler handler);
virtual bool AddAxisToInputMap(const std::string& binding, const std::string_view& device,
const std::string_view& axis, InputAxisHandler handler);
const std::string_view& axis, Controller::AxisType axis_type,
InputAxisHandler handler);
virtual bool AddRumbleToInputMap(const std::string& binding, u32 controller_index, u32 num_motors);
/// Reloads the input map from config. Callable from controller interface.