diff --git a/thin3d/d3dx9_loader.cpp b/thin3d/d3dx9_loader.cpp index bfb5e16d80..51dab2ec53 100644 --- a/thin3d/d3dx9_loader.cpp +++ b/thin3d/d3dx9_loader.cpp @@ -92,7 +92,7 @@ HMODULE loadDllLastVersion(unsigned int* version, bool debugVersion) { } std::wstring dllfname; - makeD3DX9dllFilename_by_versionW(dllfname, *version, debugVersion); + makeD3DX9dllFilename_by_versionW(dllfname, version ? *version : 0, debugVersion); HMODULE hm = ::LoadLibraryW(dllfname.c_str()); return hm; } @@ -123,7 +123,6 @@ int LoadD3DX9Dynamic(bool debugVersion) { ELOG("Failed to find D3DX dll."); return 0; } - void* ptr = NULL; const int NERROR = -1; int _begin = 0; diff --git a/ui/ui_context.cpp b/ui/ui_context.cpp index 5aa410c14c..bc7d2d6faa 100644 --- a/ui/ui_context.cpp +++ b/ui/ui_context.cpp @@ -5,6 +5,7 @@ #include "gfx/texture.h" #include "gfx_es2/draw_buffer.h" #include "gfx_es2/draw_text.h" +#include "gfx_es2/gl_state.h" UIContext::UIContext() : uishader_(0), uitexture_(0), uidrawbuffer_(0), uidrawbufferTop_(0) { @@ -42,7 +43,6 @@ void UIContext::Begin() { thin3d_->SetRenderState(T3DRenderState::CULL_MODE, T3DCullMode::NO_CULL); thin3d_->SetTexture(0, uitexture_); thin3d_->SetScissorEnabled(false); - UIBegin(uishader_); }