Print full compile error in Cg.

This commit is contained in:
Themaister 2011-07-03 13:41:24 +02:00
parent 36c6c21194
commit d81b9ee0a7
1 changed files with 6 additions and 0 deletions

View File

@ -295,8 +295,11 @@ static bool load_plain(const char *path)
{ {
if (!prg[i].fprg || !prg[i].vprg) if (!prg[i].fprg || !prg[i].vprg)
{ {
const char *listing = cgGetLastListing(cgCtx);
CGerror err = cgGetError(); CGerror err = cgGetError();
SSNES_ERR("CG error: %s\n", cgGetErrorString(err)); SSNES_ERR("CG error: %s\n", cgGetErrorString(err));
if (listing)
SSNES_ERR("%s\n", listing);
return false; return false;
} }
@ -802,8 +805,11 @@ static bool load_preset(const char *path)
if (!prog->fprg || !prog->vprg) if (!prog->fprg || !prog->vprg)
{ {
const char *listing = cgGetLastListing(cgCtx);
CGerror err = cgGetError(); CGerror err = cgGetError();
SSNES_ERR("CG error: %s\n", cgGetErrorString(err)); SSNES_ERR("CG error: %s\n", cgGetErrorString(err));
if (listing)
SSNES_ERR("%s\n", listing);
goto error; goto error;
} }