2 hours ago, pranciskus2 said:My code returns false here but I don't know what to do
You are not really failing at D3DApp::Init. Inside this method there is a call to InitDirect3D and inside of that method there is a call to D3D11CreateDevice which returns the error code you need. Place a break point at that line with the call to D3DApp::Init and step through the code. Eventually you'll get to the error code you need