His wife was Maria Anna Victoria of Bavaria . Despite this , Louis had been engaged to his second cousin , Maria Anna Victoria of Bavaria since he had been seven ; Maria Anna Victoria was a year older than Louis and , upon arriving at the French court , was described as being very unattractive ; she was a very cultured princess and was the daughter of Ferdinand Maria , Elector of Bavaria and his wife Princess Henriette Adelaide of Savoy .