Does anybody know how to fix d3d device being lost?

It seems that this fixed my problem with them crashing, but now they run horribly. I think the problem may be overheating related.