diff options
author | Sam Lantinga <slouken@libsdl.org> | 2011-12-29 05:18:16 -0500 |
---|---|---|
committer | Sam Lantinga <slouken@libsdl.org> | 2011-12-29 05:18:16 -0500 |
commit | 22445abeb8c657fde8dc546e89e2c7aa8672e1d6 (patch) | |
tree | 109222989aead73fd02edbb64d1b3cc54d7b4f15 /src | |
parent | cbb4ebbeaa9543f1da232029d85c2c5cb34640bb (diff) |
Fixed bug 1338 - Direct3D renderer should set D3DCREATE_FPU_PRESERVE for not behaving vastly different on doubles (causes 3rd party lib crashes!)
Jonas Thiem 2011-11-29 12:28:02 PST
Direct3D renderer should set D3DCREATE_FPU_PRESERVE for not behaving vastly
different to OpenGL/software rendering on doubles and break some libraries
really badly.
Most notable affected example: Lua, which does the most unpredictable things
which are really almost impossible to debug/find out for beginners who never
heard this culprit exists.
Since I believe all renderers should behave the same on that doubles simply
work as expected in a program, this should really be changed! (also this wasted
a few days of my life wondering why everything in my program was so broken)
Diffstat (limited to 'src')
-rw-r--r-- | src/render/direct3d/SDL_render_d3d.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/render/direct3d/SDL_render_d3d.c b/src/render/direct3d/SDL_render_d3d.c index 974796a1..233cdd99 100644 --- a/src/render/direct3d/SDL_render_d3d.c +++ b/src/render/direct3d/SDL_render_d3d.c @@ -441,11 +441,11 @@ D3D_CreateRenderer(SDL_Window * window, Uint32 flags) result = IDirect3D9_CreateDevice(data->d3d, data->adapter, D3DDEVTYPE_HAL, pparams.hDeviceWindow, - (caps. + D3DCREATE_FPU_PRESERVE | ((caps. DevCaps & D3DDEVCAPS_HWTRANSFORMANDLIGHT) ? D3DCREATE_HARDWARE_VERTEXPROCESSING : - D3DCREATE_SOFTWARE_VERTEXPROCESSING, + D3DCREATE_SOFTWARE_VERTEXPROCESSING), &pparams, &data->device); if (FAILED(result)) { D3D_DestroyRenderer(renderer); |