mirror of
https://github.com/UberGames/lilium-voyager.git
synced 2024-11-10 14:41:42 +00:00
Improve warning for shader missing opening brace
This commit is contained in:
parent
3ec2b02dce
commit
d4f785c465
2 changed files with 14 additions and 2 deletions
|
@ -2961,7 +2961,13 @@ static void ScanAndLoadShaderFiles( void )
|
||||||
token = COM_ParseExt(&p, qtrue);
|
token = COM_ParseExt(&p, qtrue);
|
||||||
if(token[0] != '{' || token[1] != '\0')
|
if(token[0] != '{' || token[1] != '\0')
|
||||||
{
|
{
|
||||||
ri.Printf(PRINT_WARNING, "WARNING: Bad shader file %s has incorrect syntax.\n", filename);
|
ri.Printf(PRINT_WARNING, "WARNING: Ignoring shader file %s. Shader \"%s\" on line %d missing opening brace",
|
||||||
|
filename, shaderName, shaderLine);
|
||||||
|
if (token[0])
|
||||||
|
{
|
||||||
|
ri.Printf(PRINT_WARNING, " (found \"%s\" on line %d)", token, COM_GetCurrentParseLine());
|
||||||
|
}
|
||||||
|
ri.Printf(PRINT_WARNING, ".\n");
|
||||||
ri.FS_FreeFile(buffers[i]);
|
ri.FS_FreeFile(buffers[i]);
|
||||||
buffers[i] = NULL;
|
buffers[i] = NULL;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -3601,7 +3601,13 @@ static void ScanAndLoadShaderFiles( void )
|
||||||
token = COM_ParseExt(&p, qtrue);
|
token = COM_ParseExt(&p, qtrue);
|
||||||
if(token[0] != '{' || token[1] != '\0')
|
if(token[0] != '{' || token[1] != '\0')
|
||||||
{
|
{
|
||||||
ri.Printf(PRINT_WARNING, "WARNING: Bad shader file %s has incorrect syntax.\n", filename);
|
ri.Printf(PRINT_WARNING, "WARNING: Ignoring shader file %s. Shader \"%s\" on line %d missing opening brace",
|
||||||
|
filename, shaderName, shaderLine);
|
||||||
|
if (token[0])
|
||||||
|
{
|
||||||
|
ri.Printf(PRINT_WARNING, " (found \"%s\" on line %d)", token, COM_GetCurrentParseLine());
|
||||||
|
}
|
||||||
|
ri.Printf(PRINT_WARNING, ".\n");
|
||||||
ri.FS_FreeFile(buffers[i]);
|
ri.FS_FreeFile(buffers[i]);
|
||||||
buffers[i] = NULL;
|
buffers[i] = NULL;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue