projects
/
hashcat.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added --gpu-temp-retain support for windows through nvapi
[hashcat.git]
/
src
/
hashcat.c
diff --git
a/src/hashcat.c
b/src/hashcat.c
index
0cf7d2d
..
4425b83
100644
(file)
--- a/
src/hashcat.c
+++ b/
src/hashcat.c
@@
-4235,7
+4235,11
@@
static void *thread_monitor (void *p)
}
else if (device_param->device_vendor_id == VENDOR_ID_NV)
{
}
else if (device_param->device_vendor_id == VENDOR_ID_NV)
{
- #ifdef _POSIX
+ #ifdef _WIN
+ hm_set_fanspeed_with_device_id_nvapi (device_id, fan_speed_new, 1);
+ #endif
+
+ #ifdef _LINUX
hm_set_fanspeed_with_device_id_xnvctrl (device_id, fan_speed_new);
#endif
}
hm_set_fanspeed_with_device_id_xnvctrl (device_id, fan_speed_new);
#endif
}
@@
-14066,7
+14070,7
@@
int main (int argc, char **argv)
{
need_nvml = 1;
{
need_nvml = 1;
- #ifdef _POSIX
+ #ifdef _LINUX
need_xnvctrl = 1;
#endif
need_xnvctrl = 1;
#endif
@@
-16180,7
+16184,11
@@
int main (int argc, char **argv)
}
else if (device_param->device_vendor_id == VENDOR_ID_NV)
{
}
else if (device_param->device_vendor_id == VENDOR_ID_NV)
{
- #ifdef _POSIX
+ #ifdef _WIN
+ rc = hm_set_fanspeed_with_device_id_nvapi (device_id, fanspeed, 1);
+ #endif
+
+ #ifdef _LINUX
rc = set_fan_control (data.hm_xnvctrl, data.hm_device[device_id].xnvctrl, NV_CTRL_GPU_COOLER_MANUAL_CONTROL_TRUE);
#endif
}
rc = set_fan_control (data.hm_xnvctrl, data.hm_device[device_id].xnvctrl, NV_CTRL_GPU_COOLER_MANUAL_CONTROL_TRUE);
#endif
}
@@
-18382,7
+18390,11
@@
int main (int argc, char **argv)
}
else if (device_param->device_vendor_id == VENDOR_ID_NV)
{
}
else if (device_param->device_vendor_id == VENDOR_ID_NV)
{
- #ifdef _POSIX
+ #ifdef _WIN
+ rc = hm_set_fanspeed_with_device_id_nvapi (device_id, fanspeed, fanpolicy);
+ #endif
+
+ #ifdef _LINUX
rc = set_fan_control (data.hm_xnvctrl, data.hm_device[device_id].xnvctrl, NV_CTRL_GPU_COOLER_MANUAL_CONTROL_FALSE);
#endif
}
rc = set_fan_control (data.hm_xnvctrl, data.hm_device[device_id].xnvctrl, NV_CTRL_GPU_COOLER_MANUAL_CONTROL_FALSE);
#endif
}