I know this is old, but this is the only thread that keeps coming up in searches that has fixed this problem for me, and I wanted to say thanks, and also include my controller model in case it helps anyone else.
Controller: GameSir G3s controller in X-input mode.
Left and right triggers were working at one point, and somewhere along the line, remapping the controller broke analog L2/R2. However, manually editing the config, like the user above (rilight) to +2 and +5 (yes, you need the + in there), fixed it for me. Specifically, this problem was plaguing me while playing OutRun on MAME.
Just wanted to say thanks to mitu and rilight. ;-)