From: Alistair Leslie-Hughes leslie_alistair@hotmail.com
Signed-off-by: Alistair Leslie-Hughes leslie_alistair@hotmail.com --- dlls/d3drm/meshbuilder.c | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-)
diff --git a/dlls/d3drm/meshbuilder.c b/dlls/d3drm/meshbuilder.c index 1f783baf1fe..460cc0d3388 100644 --- a/dlls/d3drm/meshbuilder.c +++ b/dlls/d3drm/meshbuilder.c @@ -1463,7 +1463,7 @@ static HRESULT WINAPI d3drm_mesh_builder3_Load(IDirect3DRMMeshBuilder3 *iface, v void *name, D3DRMLOADOPTIONS loadflags, D3DRMLOADTEXTURE3CALLBACK cb, void *arg) { struct d3drm_mesh_builder *mesh_builder = impl_from_IDirect3DRMMeshBuilder3(iface); - DXFILELOADOPTIONS load_options; + DXFILELOADOPTIONS load_options = loadflags & 0x0F; IDirectXFile *dxfile = NULL; IDirectXFileEnumObject *enum_object = NULL; IDirectXFileData *data = NULL; @@ -1478,21 +1478,6 @@ static HRESULT WINAPI d3drm_mesh_builder3_Load(IDirect3DRMMeshBuilder3 *iface, v
clean_mesh_builder_data(mesh_builder);
- if (loadflags == D3DRMLOAD_FROMMEMORY) - { - load_options = DXFILELOAD_FROMMEMORY; - } - else if (loadflags == D3DRMLOAD_FROMFILE) - { - load_options = DXFILELOAD_FROMFILE; - TRACE("Loading from file %s\n", debugstr_a(filename)); - } - else - { - FIXME("Load options %ld not supported yet\n", loadflags); - return E_NOTIMPL; - } - hr = DirectXFileCreate(&dxfile); if (hr != DXFILE_OK) goto end; @@ -1503,7 +1488,10 @@ static HRESULT WINAPI d3drm_mesh_builder3_Load(IDirect3DRMMeshBuilder3 *iface, v
hr = IDirectXFile_CreateEnumObject(dxfile, filename, load_options, &enum_object); if (hr != DXFILE_OK) + { + FIXME("Failed to Enum object for type %#lx\n", loadflags); goto end; + }
hr = IDirectXFileEnumObject_GetNextDataObject(enum_object, &data); if (hr != DXFILE_OK)