made deadzones configurable

This commit is contained in:
Siddharth committed 2013-10-28 16:43:42 +05:30
1 parent ec0e0d7047
commit 5daaaa3aad
4 files changed
+7 -1

No files matched your search

+1 -1
View File
@@ -192,7 +192,7 @@ void EmuScreen::sendMessage(const char *message, const char *value) {
//curve1 implements a smooth deadzone as described here:
//http://www.gamasutra.com/blogs/JoshSutphin/20130416/190541/Doing_Thumbstick_Dead_Zones_Right.php
inline float curve1(float x) {
const float deadzone = 0.03f;
const float deadzone = g_Config.fDeadzoneRadius;
const float factor = 1.0f / (1.0f - deadzone);
if (x > deadzone) {
return (x - deadzone) * (x - deadzone) * factor;