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.


You can try the standard fixes:

People have reported the following fix the issues.

  • Setting Game Launch Options to -dx9.
  • Browse Local Files.
    Right click A Hat in Time; press Properties...; select Local Files tab; select Browse Local Files...
    This will open an explorer window to steamapps\common\HatinTime. From here navigate to HatinTimeGame\Config and open HatinTimeSystemSettings.ini

    Edit game config.

    From here there are two reported fixes:

    • Edit ResX and ResY to smaller values.

    • Set Fullscreen to false.


For me setting fullscreen to false worked.
The game set my vertical monitor as the default, and then positioned the game on a different monitor.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.