Controller not working on PC

I recently bought Forza Horzion 4 for PC and I have A PDP controller for the Xbox one. However, the game forces me to play with keyboard and mouse instead of the controller and it still forces me to use keyboard and mouse despite being unplugged. I know the controller works because it works for other games as well. I use windows 10 but I don’t know why the game doesn’t recognize my controller.

Try to reinstall dx end runtime, i didnt have that problem in forza, but worked for me on another game.