Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Fixed warning messages when loading Direct3D DLL
Browse files Browse the repository at this point in the history
kmx

I have investigated the warning "Failed loading D3DX9_*.dll" and come up with the enclosed patch (please forward it to relevant SDL2 mailing list/bugtracker).
  • Loading branch information
slouken committed Mar 6, 2013
1 parent 6c6393c commit 8da2cef
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/render/direct3d/SDL_render_d3d.c
Expand Up @@ -477,7 +477,9 @@ D3D_CreateRenderer(SDL_Window * window, Uint32 flags)

for (d3dxVersion=50;d3dxVersion>0;d3dxVersion--) {
SDL_snprintf(d3dxDLLFile, 49, "D3DX9_%02d.dll", d3dxVersion);
data->d3dxDLL = SDL_LoadObject(d3dxDLLFile);
LPTSTR tmpstr = WIN_UTF8ToString(d3dxDLLFile);
data->d3dxDLL = (void *)LoadLibrary(tmpstr); /* not using SDL_LoadObject() as we want silently fail - no error message */
SDL_free(tmpstr);
if (data->d3dxDLL) {
HRESULT (WINAPI *D3DXCreateMatrixStack) (DWORD Flags, LPD3DXMATRIXSTACK* ppStack);
D3DXCreateMatrixStack = (HRESULT (WINAPI *) (DWORD, LPD3DXMATRIXSTACK*)) SDL_LoadFunction(data->d3dxDLL, "D3DXCreateMatrixStack");
Expand Down

0 comments on commit 8da2cef

Please sign in to comment.