In a 7-2 decision, with the majority written by Justice Scalia [pdf], the Court held that the law was a violation of the First Amendment. While California tried to argue that there's long been an obscenity exception to free speech, Scalia noted that the obscenity exemption applies to sexual content, not violence.
Our cases have been clear that the obscenity exception to the First Amendment does not cover whatever a legislature finds shocking, but only depictions of “sexual conduct...”
Scalia goes on to cite the reason for this distinction: classic works of childrens' literature are often graphically violent (like Grimm's Fairy Tales), while we don't tend to teach graphic sexuality to children. Whether or not you agree with that distinction, that's how it's treated legally and, because California was attempting to create a new class of speech that would be subject to the obscenity exemption, they were held to a strict scrutiny standard. And, as is obvious, California's case did not pass strict scrutiny.
All of this is to say that minors still cannot be denied by law to purchase certain video games. What's surprising is that this law was a censorship "solution" to a problem that doesn't really exist. There's a private organization called the Entertainment Software Rating Board that assigns ratings to most video games, and many stores, as a matter of store policy, don't sell M-rated games to minors. A few years ago I was carded attempting to buy Grand Theft Auto. [It's my youthful looks.] And all of this without government interference!
Of course, a lot of this self-regulation was in response to a threat by the government to regulate in the face of Mortal Kombat and other early-90s violent video game content. But nothing's ever enough for government censors; if even one iota of censorship is done by self-regulation, rather than a government board, they get jittery.
As a side note, those who like to lump Antonin Scalia and Clarence Thomas together as judicial clones should note that Thomas dissented from Scalia's majority opinion.