mirror of
https://github.com/GOSTSec/sgminer
synced 2025-02-02 10:04:33 +00:00
disable curses device resize that crashes on windows
This commit is contained in:
parent
045e105dcc
commit
e300e50281
12
cgminer.c
12
cgminer.c
@ -7128,8 +7128,11 @@ struct _cgpu_devid_counter {
|
|||||||
|
|
||||||
static void adjust_mostdevs(void)
|
static void adjust_mostdevs(void)
|
||||||
{
|
{
|
||||||
|
// device window resize crashes on windows - disable resize now
|
||||||
|
#ifndef WIN32
|
||||||
if (total_devices - zombie_devs > most_devices)
|
if (total_devices - zombie_devs > most_devices)
|
||||||
most_devices = total_devices - zombie_devs;
|
most_devices = total_devices - zombie_devs;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
bool add_cgpu(struct cgpu_info *cgpu)
|
bool add_cgpu(struct cgpu_info *cgpu)
|
||||||
@ -7565,13 +7568,20 @@ int main(int argc, char *argv[])
|
|||||||
quit(1, "All devices disabled, cannot mine!");
|
quit(1, "All devices disabled, cannot mine!");
|
||||||
#endif
|
#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();
|
load_temp_cutoffs();
|
||||||
|
|
||||||
for (i = 0; i < total_devices; ++i)
|
for (i = 0; i < total_devices; ++i)
|
||||||
devices[i]->cgminer_stats.getwork_wait_min.tv_sec = MIN_SEC_UNSET;
|
devices[i]->cgminer_stats.getwork_wait_min.tv_sec = MIN_SEC_UNSET;
|
||||||
|
|
||||||
if (!opt_compact) {
|
if (!opt_compact) {
|
||||||
logstart += total_devices;
|
logstart += most_devices;
|
||||||
logcursor = logstart + 1;
|
logcursor = logstart + 1;
|
||||||
#ifdef HAVE_CURSES
|
#ifdef HAVE_CURSES
|
||||||
check_winsizes();
|
check_winsizes();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user