Failed to create 3D3 device! Please help!

So today, i was going to get on Gmod but when i started it up, the screen went black and said Failed to create D3D device, so i restarted my computer and it still doesnt work. Can someone please help!

I am also getting this same exact problem when I open up Resistance and liberation! Please help!!!
nevermind, I found a fix, right click the game, click properties, then click on set launch options and type -w 1280 h 1024