diff --git a/samples/wrapper/wrapper.cpp b/samples/wrapper/wrapper.cpp index 0eeb56e7a4..7dd3f81e7d 100644 --- a/samples/wrapper/wrapper.cpp +++ b/samples/wrapper/wrapper.cpp @@ -98,6 +98,7 @@ int gpu_device_num = -1; double runtime = 0; // run time this session double trickle_period = 0; +bool enable_graphics_support = false; vector unzip_filenames; string zip_filename; vector zip_patterns; @@ -520,6 +521,7 @@ int parse_job_file() { parse_zip_output(xp); continue; } + if (xp.parse_bool("enable_graphics_support", enable_graphics_support)) continue; fprintf(stderr, "%s unexpected tag in job.xml: %s\n", boinc_msg_prefix(buf2, sizeof(buf2)), xp.parsed_tag @@ -1143,11 +1145,13 @@ int main(int argc, char** argv) { check_trickle_period(); } - boinc_write_graphics_status( - task.starting_cpu + cpu_time, - checkpoint_cpu_time + task.elapsed_time, - frac_done + task.weight/total_weight - ); + if (enable_graphics_support) { + boinc_write_graphics_status( + task.starting_cpu + cpu_time, + checkpoint_cpu_time + task.elapsed_time, + frac_done + task.weight/total_weight + ); + } boinc_sleep(POLL_PERIOD); if (!task.suspended) {