src/render/direct3d/SDL_render_d3d.c
changeset 6115 d4621a7e0faa
parent 6076 e69b1bd26e0b
child 6138 4c64952a58fb
equal deleted inserted replaced
6114:d166819bf2b3 6115:d4621a7e0faa
   439     IDirect3D9_GetDeviceCaps(data->d3d, data->adapter, D3DDEVTYPE_HAL, &caps);
   439     IDirect3D9_GetDeviceCaps(data->d3d, data->adapter, D3DDEVTYPE_HAL, &caps);
   440 
   440 
   441     result = IDirect3D9_CreateDevice(data->d3d, data->adapter,
   441     result = IDirect3D9_CreateDevice(data->d3d, data->adapter,
   442                                      D3DDEVTYPE_HAL,
   442                                      D3DDEVTYPE_HAL,
   443                                      pparams.hDeviceWindow,
   443                                      pparams.hDeviceWindow,
   444                                      (caps.
   444                                      D3DCREATE_FPU_PRESERVE | ((caps.
   445                                       DevCaps &
   445                                       DevCaps &
   446                                       D3DDEVCAPS_HWTRANSFORMANDLIGHT) ?
   446                                       D3DDEVCAPS_HWTRANSFORMANDLIGHT) ?
   447                                      D3DCREATE_HARDWARE_VERTEXPROCESSING :
   447                                      D3DCREATE_HARDWARE_VERTEXPROCESSING :
   448                                      D3DCREATE_SOFTWARE_VERTEXPROCESSING,
   448                                      D3DCREATE_SOFTWARE_VERTEXPROCESSING),
   449                                      &pparams, &data->device);
   449                                      &pparams, &data->device);
   450     if (FAILED(result)) {
   450     if (FAILED(result)) {
   451         D3D_DestroyRenderer(renderer);
   451         D3D_DestroyRenderer(renderer);
   452         D3D_SetError("CreateDevice()", result);
   452         D3D_SetError("CreateDevice()", result);
   453         return NULL;
   453         return NULL;