mirror of
https://github.com/glest/glest-source.git
synced 2025-08-16 05:13:59 +02:00
do not crash and exit game when core data textures are not found
This commit is contained in:
@@ -930,7 +930,7 @@ void Texture2DGl::init(Filter filter, int maxAnisotropy) {
|
||||
if(error != GL_NO_ERROR) {
|
||||
const char *errorString= reinterpret_cast<const char*>(gluErrorString(error));
|
||||
char szBuf[8096]="";
|
||||
snprintf(szBuf,8096,"Error creating texture 2D [%s], returned: %d [%s] (%X) [%s] w = %d, h = %d, glInternalFormat = %d, glFormat = %d, glCompressionFormat = %d",this->path.c_str(),error,errorString,error,pixmap.getPath().c_str(),pixmap.getW(),pixmap.getH(),glInternalFormat,glFormat,glCompressionFormat);
|
||||
snprintf(szBuf,8096,"Error creating texture 2D path [%s], returned: %d [%s] (%X) [%s] w = %d, h = %d, glInternalFormat = %d, glFormat = %d, glCompressionFormat = %d",this->path.c_str(),error,errorString,error,pixmap.getPath().c_str(),pixmap.getW(),pixmap.getH(),glInternalFormat,glFormat,glCompressionFormat);
|
||||
throw megaglest_runtime_error(szBuf);
|
||||
}
|
||||
}
|
||||
|
@@ -85,7 +85,7 @@ bool showMessage(std::string warning,string writepath) {
|
||||
//command += " --title \"Error\" --msgbox \"`printf \"" + warning + "\"`\"";
|
||||
command += " --title \"Error\" --text-info --filename=" + text_file;
|
||||
|
||||
printf("\n\n\nzenity command [%s]\n\n\n",command.c_str());
|
||||
//printf("\n\n\nzenity command [%s]\n\n\n",command.c_str());
|
||||
|
||||
FILE *fp = popen(command.c_str(),"r");
|
||||
if (fp != 0)
|
||||
|
Reference in New Issue
Block a user