Fixed compile errors on Windows
This commit is contained in:
parent
4a942814bd
commit
541a638836
2 changed files with 6 additions and 4 deletions
|
@ -42,6 +42,7 @@
|
||||||
#include "SDL_timer.h"
|
#include "SDL_timer.h"
|
||||||
#include "SDL_mutex.h"
|
#include "SDL_mutex.h"
|
||||||
#include "SDL_events.h"
|
#include "SDL_events.h"
|
||||||
|
#include "SDL_hints.h"
|
||||||
#if !SDL_EVENTS_DISABLED
|
#if !SDL_EVENTS_DISABLED
|
||||||
#include "../../events/SDL_events_c.h"
|
#include "../../events/SDL_events_c.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -476,10 +476,11 @@ D3D_CreateRenderer(SDL_Window * window, Uint32 flags)
|
||||||
}
|
}
|
||||||
|
|
||||||
for (d3dxVersion=50;d3dxVersion>0;d3dxVersion--) {
|
for (d3dxVersion=50;d3dxVersion>0;d3dxVersion--) {
|
||||||
SDL_snprintf(d3dxDLLFile, 49, "D3DX9_%02d.dll", d3dxVersion);
|
LPTSTR dllName;
|
||||||
LPTSTR tmpstr = WIN_UTF8ToString(d3dxDLLFile);
|
SDL_snprintf(d3dxDLLFile, sizeof(d3dxDLLFile), "D3DX9_%02d.dll", d3dxVersion);
|
||||||
data->d3dxDLL = (void *)LoadLibrary(tmpstr); /* not using SDL_LoadObject() as we want silently fail - no error message */
|
dllName = WIN_UTF8ToString(d3dxDLLFile);
|
||||||
SDL_free(tmpstr);
|
data->d3dxDLL = (void *)LoadLibrary(dllName); /* not using SDL_LoadObject() as we want silently fail - no error message */
|
||||||
|
SDL_free(dllName);
|
||||||
if (data->d3dxDLL) {
|
if (data->d3dxDLL) {
|
||||||
HRESULT (WINAPI *D3DXCreateMatrixStack) (DWORD Flags, LPD3DXMATRIXSTACK* ppStack);
|
HRESULT (WINAPI *D3DXCreateMatrixStack) (DWORD Flags, LPD3DXMATRIXSTACK* ppStack);
|
||||||
D3DXCreateMatrixStack = (HRESULT (WINAPI *) (DWORD, LPD3DXMATRIXSTACK*)) SDL_LoadFunction(data->d3dxDLL, "D3DXCreateMatrixStack");
|
D3DXCreateMatrixStack = (HRESULT (WINAPI *) (DWORD, LPD3DXMATRIXSTACK*)) SDL_LoadFunction(data->d3dxDLL, "D3DXCreateMatrixStack");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue