disable curses device resize that crashes on windows
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
diff --git a/cgminer.c b/cgminer.c
index 4f3a2f7..059bddb 100644
--- a/cgminer.c
+++ b/cgminer.c
@@ -7128,8 +7128,11 @@ struct _cgpu_devid_counter {
static void adjust_mostdevs(void)
{
+// device window resize crashes on windows - disable resize now
+#ifndef WIN32
if (total_devices - zombie_devs > most_devices)
most_devices = total_devices - zombie_devs;
+#endif
}
bool add_cgpu(struct cgpu_info *cgpu)
@@ -7565,13 +7568,20 @@ int main(int argc, char *argv[])
quit(1, "All devices disabled, cannot mine!");
#endif
+// device window resize crashes on windows - disable resize now
+#ifdef WIN32
+ most_devices = total_devices + 1; // Allow space for 1 hotplug
+#else
+ most_devices = total_devices;
+#endif
+
load_temp_cutoffs();
for (i = 0; i < total_devices; ++i)
devices[i]->cgminer_stats.getwork_wait_min.tv_sec = MIN_SEC_UNSET;
if (!opt_compact) {
- logstart += total_devices;
+ logstart += most_devices;
logcursor = logstart + 1;
#ifdef HAVE_CURSES
check_winsizes();