mirror of https://github.com/BOINC/boinc.git
client: fix compile break on Mac
svn path=/trunk/boinc/; revision=17276
This commit is contained in:
parent
4d1544e579
commit
c8ad5b1def
|
@ -1618,3 +1618,9 @@ David 16 Feb 2009
|
||||||
coproc.cpp,h
|
coproc.cpp,h
|
||||||
win_build/
|
win_build/
|
||||||
libboinc.vcproj
|
libboinc.vcproj
|
||||||
|
|
||||||
|
Charlie 13 Feb 2009
|
||||||
|
- client: fix compile break on Mac.
|
||||||
|
|
||||||
|
lib/
|
||||||
|
coproc.cpp
|
||||||
|
|
|
@ -155,18 +155,18 @@ string COPROC_CUDA::get(COPROCS& coprocs) {
|
||||||
return "Library doesn't have cudaGetDeviceProperties()";
|
return "Library doesn't have cudaGetDeviceProperties()";
|
||||||
}
|
}
|
||||||
|
|
||||||
NvAPI_Status nvapiStatus;
|
NvAPI_Status nvapiStatus;
|
||||||
NvDisplayHandle hDisplay;
|
NvDisplayHandle hDisplay;
|
||||||
NV_DISPLAY_DRIVER_VERSION Version;
|
NV_DISPLAY_DRIVER_VERSION Version;
|
||||||
memset(&Version, 0, sizeof(Version));
|
memset(&Version, 0, sizeof(Version));
|
||||||
Version.version = NV_DISPLAY_DRIVER_VERSION_VER;
|
Version.version = NV_DISPLAY_DRIVER_VERSION_VER;
|
||||||
|
|
||||||
NvAPI_Initialize();
|
NvAPI_Initialize();
|
||||||
for (int i=0; ; i++) {
|
for (int i=0; ; i++) {
|
||||||
nvapiStatus = NvAPI_EnumNvidiaDisplayHandle(i, &hDisplay);
|
nvapiStatus = NvAPI_EnumNvidiaDisplayHandle(i, &hDisplay);
|
||||||
if (nvapiStatus != NVAPI_OK) break;
|
if (nvapiStatus != NVAPI_OK) break;
|
||||||
nvapiStatus = NvAPI_GetDisplayDriverVersion(hDisplay, &Version);
|
nvapiStatus = NvAPI_GetDisplayDriverVersion(hDisplay, &Version);
|
||||||
if (nvapiStatus == NVAPI_OK) break;
|
if (nvapiStatus == NVAPI_OK) break;
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
@ -208,7 +208,11 @@ string COPROC_CUDA::get(COPROCS& coprocs) {
|
||||||
(*__cudaGetDeviceProperties)(&cc.prop, i);
|
(*__cudaGetDeviceProperties)(&cc.prop, i);
|
||||||
if (cc.prop.major <= 0) continue; // major == 0 means emulation
|
if (cc.prop.major <= 0) continue; // major == 0 means emulation
|
||||||
if (cc.prop.major > 100) continue; // e.g. 9999 is an error
|
if (cc.prop.major > 100) continue; // e.g. 9999 is an error
|
||||||
|
#ifdef _WIN32
|
||||||
cc.drvVersion = Version.drvVersion;
|
cc.drvVersion = Version.drvVersion;
|
||||||
|
#else
|
||||||
|
cc.drvVersion = 0;
|
||||||
|
#endif
|
||||||
cc.description(buf);
|
cc.description(buf);
|
||||||
|
|
||||||
if (real_count) {
|
if (real_count) {
|
||||||
|
|
Loading…
Reference in New Issue