Input problems with Mupen64 and Xbox One triggers

So I’m having some input problems with mupen64 in retroarch.

Up until recently I was using a 360 controller to play n64 games and had the z trigger mapped to the L trigger on the 360 pad and it worked perfectly fine.

My 360 controller broke and I replaced it with an Xbone controller. Everything works fine except mupen doesn’t recognize the trigger inputs. However the triggers work fine when mapping the keys in the retroarch menu. My only guess is that mupen has trouble converting the analog trigger input into digital, but I don’t know why this would be the case considering it worked just fine with the 360 pad.

Anyone know what might be the problem here?