A Hat in Time: Failed to create the D3D9 device

Been trying to play a hat in time, it used to work fine before but now it suddenly gives me this error? am I missing some packages or have some of them broken? what does this mean exactly?
Screenshot from 2020-09-17 18-30-13