mirror of https://github.com/BOINC/boinc.git
OpenCL: Add a second API for boinc_get_opencl_ids() which is compatible with older clients (before BOINC 7.0.12)
This commit is contained in:
parent
e8abd328d1
commit
ed35d78490
|
@ -183,9 +183,9 @@ int boinc_get_opencl_ids(int argc, char** argv, char* type, cl_device_id* device
|
|||
gpu_device_num = aid.gpu_device_num;
|
||||
if (gpu_device_num < 0) {
|
||||
// Even older versions of init_data.xml don't have gpu_device_num field
|
||||
for (i=1; i<argc; i++) {
|
||||
for (i=0; i<argc-1; i++) {
|
||||
if ((!strcmp(argv[i], "--device")) || (!strcmp(argv[i], "-device"))) {
|
||||
gpu_device_num = atoi(argv[++i]);
|
||||
gpu_device_num = atoi(argv[i+1]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue