Gamepad works in menu but not inside game

Gamepad does work in menus but not inside games. It is detected, because I have some keys mapped with antimicro like f6 and f7 to change save states, and that function works because it is sent as keyboard. But normal buttons dont work. I’m in windows 8.1, using a ps4 gamepad, normally working with steam drivers. I cant move accept or cancel or do anything in game.

update: I tried re configuring the gamepad, but it seems like one button is “constantly pressed” on the menu. Please help!