Skip to content

Commit c854e38

Browse files
SiegeLordExSiegeLord
authored andcommitted
Make D3DX9 required on Windows for D3D support.
Also, fix a few assorted D3D errors found by Visual Studio.
1 parent d4c6111 commit c854e38

File tree

3 files changed

+7
-10
lines changed

3 files changed

+7
-10
lines changed

‎CMakeLists.txt‎

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -872,21 +872,18 @@ if(WIN32)
872872
endif(XINPUT_FOUND)
873873

874874
if(WANT_D3D)
875-
if(D3D9_FOUND)
875+
if(D3D9_FOUND AND D3DX9_FOUND)
876876
set(SUPPORT_D3D 1)
877877
set(ALLEGRO_CFG_D3D 1)
878-
endif(D3D9_FOUND)
879-
endif(WANT_D3D)
878+
set(ALLEGRO_CFG_D3DX9 1)
879+
endif()
880880

881-
if(SUPPORT_D3D)
882881
if(D3DX9_FOUND)
883882
include_directories(BEFORE ${D3DX9_INCLUDE_DIR})
884-
set(ALLEGRO_CFG_D3DX9 1)
885883
else()
886-
message("D3DX9 not found. You will not be able to compress or "
887-
"decompress textures on the GPU.")
884+
message("D3DX9 not found, disabling D3D support.")
888885
endif()
889-
endif(SUPPORT_D3D)
886+
endif(WANT_D3D)
890887

891888
if(WANT_D3D9EX AND SUPPORT_D3D)
892889
set(ALLEGRO_CFG_D3D9EX 1)

‎addons/primitives/primitives.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ void* al_lock_index_buffer(ALLEGRO_INDEX_BUFFER* buffer, int offset,
160160
void al_unlock_vertex_buffer(ALLEGRO_VERTEX_BUFFER* buffer)
161161
{
162162
ASSERT(addon_initialized);
163-
return _al_unlock_vertex_buffer(buffer);
163+
_al_unlock_vertex_buffer(buffer);
164164
}
165165

166166
/* Function: al_unlock_index_buffer

‎src/win/d3d_disp.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3085,7 +3085,7 @@ static D3D_STATE setup_state(LPDIRECT3DDEVICE9 device, const ALLEGRO_VERTEX_DECL
30853085
if (use_fixed_pipeline) {
30863086
device->GetTextureStageState(0, D3DTSS_TEXTURETRANSFORMFLAGS, &state.old_ttf_state);
30873087
device->SetTextureStageState(0, D3DTSS_TEXTURETRANSFORMFLAGS, D3DTTFF_COUNT2);
3088-
device->SetTransform(D3DTS_TEXTURE0, (D3DMATRIX *)&mat);
3088+
device->SetTransform(D3DTS_TEXTURE0, (D3DMATRIX *)mat);
30893089
}
30903090
else {
30913091
d3d_disp->effect->SetMatrix(ALLEGRO_SHADER_VAR_TEX_MATRIX, (D3DXMATRIX *)mat);

0 commit comments

Comments
 (0)