public void DisableScreenSaver() { if (m_LastPulledScreensaverActiveStateIsRefreshed && m_LastPulledScreensaverActiveState != 0) { var setScreensaverActiveCallRet = ScreenSaverInteractions.SystemParametersInfo(ScreenSaverInteractions.SPI_SETSCREENSAVEACTIVE, 0, ref uintNULL, 0); } }
public void RestoreSystem() { if (m_LastPulledScreensaverActiveStateIsRefreshed && m_ShouldSetScreenSaverOnEnd) { var setScreensaverActiveCallRet = ScreenSaverInteractions.SystemParametersInfo(ScreenSaverInteractions.SPI_SETSCREENSAVEACTIVE, m_LastPulledScreensaverActiveState, ref uintNULL, 0); } }
public void PullSystemSettings() { m_LastPulledScreensaverTimeoutIsRefreshed = false; { m_LastPulledScreensaverTimeoutRefreshedAt = DateTime.Now; var getTimeoutCallRet = ScreenSaverInteractions.SystemParametersInfo(ScreenSaverInteractions.SPI_GETSCREENSAVETIMEOUT, 0, ref m_LastPulledScreensaverTimeout, 0); m_LastPulledScreensaverTimeoutIsRefreshed = getTimeoutCallRet > 0; } m_LastPulledScreensaverActiveStateIsRefreshed = false; { m_LastPulledScreensaverActiveStateRefreshedAt = DateTime.Now; var getScreenSaverActiveCallRet = ScreenSaverInteractions.SystemParametersInfo(ScreenSaverInteractions.SPI_GETSCREENSAVEACTIVE, 0, ref m_LastPulledScreensaverActiveState, 0); m_LastPulledScreensaverActiveStateIsRefreshed = getScreenSaverActiveCallRet > 0; } }