diff --git a/client/gui_rpc_server_ops.cpp b/client/gui_rpc_server_ops.cpp index a8a52a4dea..0a32ccc568 100644 --- a/client/gui_rpc_server_ops.cpp +++ b/client/gui_rpc_server_ops.cpp @@ -599,8 +599,7 @@ static void handle_get_screensaver_tasks(GUI_RPC_CONN& grc) { ); for (i=0; itask_state() == PROCESS_EXECUTING) || - ((atp->task_state() == PROCESS_SUSPENDED) && (gstate.suspend_reason == SUSPEND_REASON_CPU_THROTTLE))) { + if (atp->scheduler_state == CPU_SCHED_SCHEDULED) { atp->result->write_gui(grc.mfout); } } diff --git a/lib/common_defs.h b/lib/common_defs.h index 325100a5f8..01142c638e 100644 --- a/lib/common_defs.h +++ b/lib/common_defs.h @@ -92,8 +92,11 @@ // (used internally within the client; // changed to MSG_USER_ALERT before passing to manager) -// bitmap defs for task_suspend_reason, network_suspend_reason -// Note: doesn't need to be a bitmap, but keep for compatibility +// values for suspend_reason, network_suspend_reason +// Notes: +// - doesn't need to be a bitmap, but keep for compatibility +// - with new CPU throttling implementation (separate thread) +// CLIENT_STATE.suspend_reason will never be SUSPEND_REASON_CPU_THROTTLE. // enum SUSPEND_REASON { SUSPEND_REASON_BATTERIES = 1,