2 * Copyright (C) 2005-2018 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
8 #include "powermanagement/WinIdleTimer.h"
10 #include "ServiceBroker.h"
11 #include "application/ApplicationComponents.h"
12 #include "application/ApplicationPowerHandling.h"
14 void CWinIdleTimer::StartZero()
16 const auto& components
= CServiceBroker::GetAppComponents();
17 const auto appPower
= components
.GetComponent
<CApplicationPowerHandling
>();
18 if (!appPower
->IsDPMSActive())
19 SetThreadExecutionState(ES_SYSTEM_REQUIRED
|ES_DISPLAY_REQUIRED
);
20 CStopWatch::StartZero();