Tech stocks have had a particularly rough year in 2022, with PC gaming companies seeing steep declines in their share prices. Advanced Micro Devices (AMD 3.44%) has been similarly affected, with its stock plummeting 58% year to date. However, the company remains a strong contender for investors as its long-term prospects outweigh potential short-term losses. 

Moreover, Microsoft (MSFT 1.69%) is another gaming stock worth consideration. The company has a diverse business that has seen its stock fall 31% since January despite the Nasdaq-100 Technology Sector index's fall of 30% in the same period. Microsoft offers a strong business that could also see significant gains in the long run. 

If you can only add one to your portfolio, you might wonder if you should take advantage of AMD's bargain stock price or rely on Microsoft's decades of industry dominance. 

1. Advanced Micro Devices

As a leader in PC components, AMD has seen its stock price rise 404% in the last five years despite its dip in 2022. The launch of its Ryzen CPU platform in 2017 made it a strong competitor against Intel, leading it to reach a 25.6% market share in 2021.

The company's stock has sunk this year because of a decline in the PC market, but it remains a strong presence in the gaming industry. As of the second quarter of 2022, AMD held the second-biggest market share for graphics processing units, with 20%. Additionally, the company provides processing and graphics components to some of the best-selling game consoles in the world, Microsoft's Xbox Series X|S and Sony's PlayStation 5. In fact, the success of the console business provided AMD with a 70% boost in its year-over-year revenue in Q2 2022, with its gaming segment revenue up by 32%.

Moreover, the company enjoyed a solid second quarter, as multiple segments saw significant growth. Data center sales rose 85%, while its client segment increased by 25% year over year. However, investors grew doubtful of AMD after its third-quarter forecast, which projected between $6.5 billion and $6.9 billion, while analysts expected $6.81 billion.

AMD will likely suffer losses in its coming quarters as consumer demand continues to slow and fears of a recession grow. However, with a price-to-earnings ratio of 53.9% below what it was in January, the company's stock price is currently a bargain. Investors may be concerned about short-term losses from a temporarily declining PC market, but its strong data center and game console businesses make it a great long-term hold.

2. Microsoft

Microsoft has had a rocky journey in games, with the company considering closing down its game division in 2013 following a troubled release of its Xbox One. However, the company persevered and went on to launch Xbox Game Pass in 2017, its immensely popular game subscription service that generated $2.9 billion in 2021. The service was the first to offer console owners access to a varied library of games for a low monthly fee, increasing the value of the Xbox and leading its subscriber base to more than double from 2020 to 2022 -- from 10 million members to 25 million. 

As a result, Microsoft has become a dominating presence in the industry and used its growth to acquire a variety of game studios that can fuel Xbox Game Pass with more attractive titles. For instance, in March 2021, the company purchased the parent company of Bethesda, ZeniMax, for $7.5 billion. The move gave it ownership of popular game franchises such as Fallout and The Elder Scrolls. Then in January 2022, Microsoft announced plans to acquire games company Activision Blizzard for a historic $68.7 billion. 

The deal is still pending regulatory approval, but if it passes, it will make Microsoft the third-largest games company by revenue after Tencent and Sony.

In addition to gaming, Microsoft's diverse business includes a 75% market share of PC operating systems, a rapidly growing cloud computing brand with Azure, and multiple other services such as LinkedIn and Office. 

AMD's stock is an excellent buy with its ventures into data centers and consoles. However, Microsoft's dominance in games, along with a variety of potent brands spanning several industries, makes it a better and more reliable investment. Both companies are likely to generate significant returns over the long term, but if you can only choose one, Microsoft is the safer bet.