Ok, I got it working (I hope). The only downside is that it ignores diagonal presses on the dpad, so if your controller sucks like mine and can't do a perfect up/down/left/right then it might be a bit annoying. Bonus is that it's more responsive than the other code.
Working Camera mod: