I was playing A Hat in Time, and suddenly the game crashed. When trying to load the game up again I get the following message:
Failed to create the D3D9 Device! This can happen if the desktop is locked. Exiting...
I have ran
dxdiag which says everything is hunky-dory.