I also had this problem and like Kiwi said it is originated in the directx 9 installation.
Try to reinstall directx 9 but in my case it didn't work.
After 5 hours of research I finally found the problem: The "xinput1_3.dll" was corrupted.
You have to download and replace it.
I used the following site for it https://www.dll-files.com/xinput1_3.dll.html
Don't press the fat dowload button on top, that is a useless tool demo (no malware just useless), scroll down and chose the correct download from the list.
The funny part is that the DLL's for 64bit are located in C:\Windows\System32, where you need to replace the "xinput1_3.dll".
The Folder C:\Windows\SysWOW64 is for 32bit. I think Microsoft wanted to troll us here.
Please also make sure that your game files are located in C:\Programs and not in C:\Programs(x86) since this is also the 32bit folder but naming it x86 is more confusing (thanks again Microsoft).