Sony, the Japanese electronics maker that has been trying for years to ease its reliance on computers, televisions and mobile phones, is finally seeing the results of its restructuring.

On Tuesday, the company, which has been shifting its focus onto small-scale products like camera sensors, consoles and video games, reported sharp increases in revenue and net profit in the second quarter.

Sales of Sony’s PlayStation 4 video games console and PlayStation VR, a virtual reality headset, helped drive the strong results. The PlayStation VR, in particular, has been more popular than the company expected, and the Japanese company has become a leader in the premium side of the market.

That helped bolster net profit, which surged to 80.8 billion yen, or about $732 million, from 21.2 billion yen the year before. Revenues rose 15.2 percent compared with a year ago. Its improving prospects have helped push Sony stock up more than 35 percent this year.