d3dcompiler: Skip search of the parent include for the initial file.

This commit is contained in:
Matteo Bruni 2013-09-03 16:29:41 +02:00 committed by Alexandre Julliard
parent bcecdbda88
commit 3f221611f0
1 changed files with 6 additions and 2 deletions

View File

@ -149,8 +149,10 @@ static char *wpp_lookup_mem(const char *filename, int type, const char *parent_n
char *path;
int i;
TRACE("Looking for include %s.\n", debugstr_a(filename));
parent_include = NULL;
if(parent_name[0] != '\0')
if (strcmp(parent_name, initial_filename))
{
for(i = 0; i < includes_size; i++)
{
@ -162,7 +164,7 @@ static char *wpp_lookup_mem(const char *filename, int type, const char *parent_n
}
if(parent_include == NULL)
{
ERR("Parent include file missing\n");
ERR("Parent include %s missing.\n", debugstr_a(parent_name));
return NULL;
}
}
@ -178,6 +180,8 @@ static void *wpp_open_mem(const char *filename, int type)
struct mem_file_desc *desc;
HRESULT hr;
TRACE("Opening include %s.\n", debugstr_a(filename));
if(!strcmp(filename, initial_filename))
{
current_shader.pos = 0;