After two years in Dallas, Kyle Orton is headed for Buffalo. (USATSI)

Kyle Orton didn't want to play for the Dallas Cowboys, but apparently, he's more than happy to play for the Buffalo Bills. The veteran backup quarterback agreed to a one-year deal with the Bills, the team confirmed.

According to NFL.com, Orton can earn up to $5 million in 2014. The Buffalo News adds that the deal also includes a player option for a second year.  

The signing doesn't come as a surprise on the Bills end. Coach Doug Marrone has said all week that the team needs to find a better backup quarterback. 

"They either have to play better or we have to look to see if there's someone that can better that position, like we would any other position," Marrone said on Monday. "If we feel at the end of the day that it's not good enough to win with -- which we haven't seen that yet -- there's only two ways to go."

Since making those comments on Monday, the Bills have dumped Dennis Dixon and Thad Lewis. Buffalo also found time to sign and cut Jordan Palmer since then.

Before signing Orton, the only other quarterback left on the roster besides starter EJ Manuel was Jeff Tuel and Marrone didn't seem content or confident going into the season with Tuel as his backup.

No ad available

Orton will most likely serve as the No. 2 quarterback in Buffalo, but the Bills are paying Orton enough that it wouldn't be shocking to see him replace Manuel at some point if the second-year quarterback struggles.

If Orton plays at all for the Bills, the Cowboys will probably be slightly surprised because they thought he was going to be their backup this year.

Orton had been under contract with Dallas, but he didn't show up for the team's voluntary workouts in April. That was followed by Orton skipping May's OTA sessions and June's mandatory minicamp. 

No ad available

Eventually, the Cowboys decided to cut their losses and release Orton, but they did so under the assumption that he was going to retire. "I'm assuming that he was going to retire up until a week ago," Cowboys quarterbacks coach Wade Wilson said in July

About a week after the Cowboys cut Orton, Jerry Jones was quoted as saying he believed that Orton still wanted to play.

Not only does Orton get to play now, but he doesn't have to pay back any of the $5 million signing bonus he originally got from Dallas when he signed in 2012. If Orton had retired, he would have had to give some of it back, but since the Cowboys cut him, he gets to keep it all. 

No ad available

The Bills will be the fifth team Orton has played for since being taken by the Bears in the fourth round of the 2005 NFL Draft.