diff --git a/Core/Config.cpp b/Core/Config.cpp index c4e0d02d73..7be602f5ed 100644 --- a/Core/Config.cpp +++ b/Core/Config.cpp @@ -962,10 +962,10 @@ static ConfigSetting controlSettings[] = { ConfigSetting("AnalogRotationCWKeyX", "AnalogRotationKeyCWY", "AnalogRotationKeyCWScale", "ShowAnalogRotationCWKey", &g_Config.touchAnalogRotationCWKey, defaultTouchPosHide, true, true), ConfigSetting("AnalogRotationCCWKeyX", "AnalogRotationKeyCCWY", "AnalogRotationKeyCCWScale", "ShowAnalogRotationCCWKey", &g_Config.touchAnalogRotationCCWKey, defaultTouchPosHide, true, true), - ConfigSetting("AnalogDeadzone", &g_Config.fAnalogDeadzone, 0.0f, true, true), + ConfigSetting("AnalogDeadzone", &g_Config.fAnalogDeadzone, 0.15f, true, true), ConfigSetting("AnalogInverseDeadzone", &g_Config.fAnalogInverseDeadzone, 0.0f, true, true), - ConfigSetting("AnalogSensitivity", &g_Config.fAnalogSensitivity, 1.0f, true, true), - ConfigSetting("AnalogIsCircular", &g_Config.bAnalogIsCircular, true, true, true), + ConfigSetting("AnalogSensitivity", &g_Config.fAnalogSensitivity, 1.1f, true, true), + ConfigSetting("AnalogIsCircular", &g_Config.bAnalogIsCircular, false , true, true), ConfigSetting("AnalogLimiterDeadzone", &g_Config.fAnalogLimiterDeadzone, 0.6f, true, true), diff --git a/UI/ControlMappingScreen.cpp b/UI/ControlMappingScreen.cpp index 1335610615..9801bb58a7 100644 --- a/UI/ControlMappingScreen.cpp +++ b/UI/ControlMappingScreen.cpp @@ -605,14 +605,15 @@ void AnalogSetupScreen::CreateViews() { auto co = GetI18NCategory("Controls"); leftColumn->Add(new ItemHeader(co->T("Analog Settings", "Analog Settings"))); leftColumn->Add(new PopupSliderChoiceFloat(&g_Config.fAnalogDeadzone, 0.0f, 1.0f, co->T("Deadzone Radius"), 0.01f, screenManager(), "/ 1.0")); - leftColumn->Add(new PopupSliderChoiceFloat(&g_Config.fAnalogInverseDeadzone, 0.0f, 1.0f, co->T("Analog Mapper Low End", "Analog Mapper Low End (Inverse Deadzone)"), 0.01f, screenManager(), "/ 1.0")); - leftColumn->Add(new PopupSliderChoiceFloat(&g_Config.fAnalogSensitivity, 0.0f, 10.0f, co->T("Analog Mapper High End", "Analog Mapper High End (Axis Sensitivity)"), 0.01f, screenManager(), "x")); - leftColumn->Add(new CheckBox(&g_Config.bAnalogIsCircular, co->T("Circular Analog Stick Input"))); - leftColumn->Add(new PopupSliderChoiceFloat(&g_Config.fAnalogAutoRotSpeed, 0.0f, 25.0f, co->T("Analog auto-rotation speed"), 1.0f, screenManager())); + leftColumn->Add(new PopupSliderChoiceFloat(&g_Config.fAnalogInverseDeadzone, 0.0f, 1.0f, co->T("Low End Radius", "Low End"), 0.01f, screenManager(), "/ 1.0")); + leftColumn->Add(new PopupSliderChoiceFloat(&g_Config.fAnalogSensitivity, 0.0f, 10.0f, co->T("Sensitivity", "Sensitivity (scale factor)"), 0.01f, screenManager(), "x")); + leftColumn->Add(new CheckBox(&g_Config.bAnalogIsCircular, co->T("Circular Stick Input"))); + leftColumn->Add(new PopupSliderChoiceFloat(&g_Config.fAnalogAutoRotSpeed, 0.0f, 25.0f, co->T("Auto-rotation speed"), 1.0f, screenManager())); + leftColumn->Add(new Choice(co->T("Reset to defaults")))->OnClick.Handle(this, &AnalogSetupScreen::OnResetToDefaults); LinearLayout *theTwo = new LinearLayout(ORIENT_HORIZONTAL, new LinearLayoutParams(1.0f)); - stickView_[0] = theTwo->Add(new JoystickHistoryView(StickHistoryViewType::OUTPUT, co->T("Emulated PSP Input"), new LinearLayoutParams(1.0f))); + stickView_[0] = theTwo->Add(new JoystickHistoryView(StickHistoryViewType::OUTPUT, co->T("Calibrated"), new LinearLayoutParams(1.0f))); stickView_[1] = theTwo->Add(new JoystickHistoryView(StickHistoryViewType::INPUT, co->T("Raw Stick Input"), new LinearLayoutParams(1.0f))); rightColumn->Add(theTwo); @@ -621,6 +622,15 @@ void AnalogSetupScreen::CreateViews() { leftColumn->Add(new Button(di->T("Back"), new LayoutParams(FILL_PARENT, WRAP_CONTENT)))->OnClick.Handle(this, &UIScreen::OnBack); } +UI::EventReturn AnalogSetupScreen::OnResetToDefaults(UI::EventParams &e) { + g_Config.fAnalogDeadzone = 0.15; + g_Config.fAnalogInverseDeadzone = 0.0f; + g_Config.fAnalogSensitivity = 1.1f; + g_Config.bAnalogIsCircular = false; + g_Config.fAnalogAutoRotSpeed = 8.0f; + return UI::EVENT_DONE; +} + bool TouchTestScreen::touch(const TouchInput &touch) { UIDialogScreenWithBackground::touch(touch); if (touch.flags & TOUCH_DOWN) { diff --git a/UI/ControlMappingScreen.h b/UI/ControlMappingScreen.h index 0c0fddda06..c8dc1adbe5 100644 --- a/UI/ControlMappingScreen.h +++ b/UI/ControlMappingScreen.h @@ -110,7 +110,10 @@ public: void update() override; protected: - virtual void CreateViews() override; + void CreateViews() override; + +private: + UI::EventReturn OnResetToDefaults(UI::EventParams &e); ControlMapper mapper_;