If it was working before and not now, without knowing any more specifics, it could be an issue with the controller profile(I think when it happened to me it wouldn't even work in the menus but I could remember that wrong).
This is what has worked for me and several other people:
Go to your savegame folder -- should be Documents\project cars 2\savegame\[a bunch of numbers that are probably your steam ID]\project cars 2\profiles and cut the "default.controllersettings" file and paste it somewhere else so you'll have it as a backup in case this doesn't work.
When the game boots without that file it will have to create a new one which means you'll have to re-do all your button bindings, but then it should hopefully start working.
Or of course it could be something else, but corrupted/outdated settings is an apparently common problem.