mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-15 02:29:51 +01:00
Re-add AXIS_BIND_THRESHOLD to help with mapping since I changed it for mouse differently now,
left the option, but only for analog sticks now as such renamed it.
This commit is contained in:
1 parent
ecc5441cd0
commit
9927b30dc6
3 files changed
+6
-5
No files matched your search
@@ -70,6 +70,7 @@ enum DefaultMaps {
|
||||
DEFAULT_MAPPING_XPERIA_PLAY,
|
||||
};
|
||||
|
||||
const float AXIS_BIND_THRESHOLD = 0.75f;
|
||||
const float AXIS_BIND_THRESHOLD_MOUSE = 0.01f;
|
||||
typedef std::map<int, std::vector<KeyDef>> KeyMapping;
|
||||
|
||||
|
||||
@@ -385,7 +385,7 @@ bool KeyMappingNewKeyDialog::axis(const AxisInput &axis) {
|
||||
if (IgnoreAxisForMapping(axis.axisId))
|
||||
return false;
|
||||
|
||||
if (axis.value > g_Config.fAxisBindThreshold) {
|
||||
if (axis.value > AXIS_BIND_THRESHOLD) {
|
||||
mapped_ = true;
|
||||
KeyDef kdf(axis.deviceId, KeyMap::TranslateKeyCodeFromAxis(axis.axisId, 1));
|
||||
TriggerFinish(DR_OK);
|
||||
@@ -393,7 +393,7 @@ bool KeyMappingNewKeyDialog::axis(const AxisInput &axis) {
|
||||
callback_(kdf);
|
||||
}
|
||||
|
||||
if (axis.value < -g_Config.fAxisBindThreshold) {
|
||||
if (axis.value < -AXIS_BIND_THRESHOLD) {
|
||||
mapped_ = true;
|
||||
KeyDef kdf(axis.deviceId, KeyMap::TranslateKeyCodeFromAxis(axis.axisId, -1));
|
||||
TriggerFinish(DR_OK);
|
||||
@@ -409,7 +409,7 @@ bool KeyMappingNewMouseKeyDialog::axis(const AxisInput &axis) {
|
||||
if (IgnoreAxisForMapping(axis.axisId))
|
||||
return false;
|
||||
|
||||
if (axis.value > g_Config.fAxisBindThreshold) {
|
||||
if (axis.value > AXIS_BIND_THRESHOLD) {
|
||||
mapped_ = true;
|
||||
KeyDef kdf(axis.deviceId, KeyMap::TranslateKeyCodeFromAxis(axis.axisId, 1));
|
||||
TriggerFinish(DR_OK);
|
||||
@@ -417,7 +417,7 @@ bool KeyMappingNewMouseKeyDialog::axis(const AxisInput &axis) {
|
||||
callback_(kdf);
|
||||
}
|
||||
|
||||
if (axis.value < -g_Config.fAxisBindThreshold) {
|
||||
if (axis.value < -AXIS_BIND_THRESHOLD) {
|
||||
mapped_ = true;
|
||||
KeyDef kdf(axis.deviceId, KeyMap::TranslateKeyCodeFromAxis(axis.axisId, -1));
|
||||
TriggerFinish(DR_OK);
|
||||
|
||||
@@ -555,7 +555,7 @@ void GameSettingsScreen::CreateViews() {
|
||||
auto axisToButton = new PopupSliderChoiceFloat(&g_Config.fAxisBindThreshold, 0.01f, 0.96f, co->T("Axis to button threshold"), 0.05f, screenManager());
|
||||
controlsSettings->Add(axisToButton);
|
||||
axisToButton->OnChange.Add([=](EventParams &e) {
|
||||
settingInfo_->Show(co->T("AxisToButton Tip", "Affects how far you have to push the stick(or move mouse on supported platforms) to trigger button mapped to it."), e.v);
|
||||
settingInfo_->Show(co->T("AxisToButton Tip", "Affects how far you have to push the analog stick(not mouse) to trigger the PSP button mapped to it."), e.v);
|
||||
return UI::EVENT_CONTINUE;
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user