+int BatchRenderThread::test_errmsg(BatchRenderWarnJobs &err_jobs, const char *msg, int *warn)
+{
+ int count = err_jobs.size();
+ if( !count ) return 0;
+ fprintf(stderr, msg, count);
+ char string[BCTEXTLEN], *sp = string, *ep = sp+sizeof(string)-1;
+ sp += snprintf(sp,ep-sp, msg,count);
+ for( int i=0; i<count; ++i ) {
+ int no = err_jobs[i].no;
+ const char *path = err_jobs[i].path;
+ fprintf(stderr, "%d: %s\n", no, path);
+ sp += snprintf(sp,ep-sp, "%d: %s\n", no, path);
+ }
+ sp += snprintf(sp,ep-sp, _("press cancel to abandon batch render"));
+ mwindow->show_warning(warn, string);
+ if( mwindow->wait_warning() ) {
+ gui->button_enable();
+ }
+ return 1;
+}