Commit ad7a1044 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

vout: win32: Remove screensaver inhnibition code

parent d3e6d9da
......@@ -50,9 +50,6 @@ static void CommonChangeThumbnailClip(vout_display_t *, bool show);
#if !VLC_WINSTORE_APP
static int CommonControlSetFullscreen(vout_display_t *, bool is_fullscreen);
static void DisableScreensaver(vout_display_t *);
static void RestoreScreensaver(vout_display_t *);
static bool GetRect(const vout_display_sys_t *sys, RECT *out)
{
return GetClientRect(sys->hwnd, out);
......@@ -115,7 +112,6 @@ int CommonInit(vout_display_t *vd)
vout_display_SendEventFullscreen(vd, false, false);
}
DisableScreensaver (vd);
#endif
#if !defined(NDEBUG) && defined(HAVE_DXGIDEBUG_H)
sys->dxgidebug_dll = LoadLibrary(TEXT("DXGIDEBUG.DLL"));
......@@ -345,8 +341,6 @@ void CommonClean(vout_display_t *vd)
EventThreadStop(sys->event);
EventThreadDestroy(sys->event);
}
RestoreScreensaver(vd);
}
void CommonManage(vout_display_t *vd)
......@@ -587,34 +581,6 @@ static int CommonControlSetFullscreen(vout_display_t *vd, bool is_fullscreen)
return VLC_SUCCESS;
}
static void DisableScreensaver(vout_display_t *vd)
{
vout_display_sys_t *sys = vd->sys;
/* disable screensaver by temporarily changing system settings */
sys->i_spi_screensaveactive = 0;
if (var_GetBool(vd, "disable-screensaver")) {
msg_Dbg(vd, "disabling screen saver");
SystemParametersInfo(SPI_GETSCREENSAVEACTIVE, 0,
&sys->i_spi_screensaveactive, 0);
if (FALSE != sys->i_spi_screensaveactive) {
SystemParametersInfo(SPI_SETSCREENSAVEACTIVE, 0, NULL, 0);
}
}
}
static void RestoreScreensaver(vout_display_t *vd)
{
vout_display_sys_t *sys = vd->sys;
/* restore screensaver system settings */
if (0 != sys->i_spi_screensaveactive) {
SystemParametersInfo(SPI_SETSCREENSAVEACTIVE,
sys->i_spi_screensaveactive, NULL, 0);
}
}
#else
void CommonManage(vout_display_t *vd) {
......
......@@ -62,9 +62,6 @@ typedef struct vout_display_sys_win32_t
bool is_first_display;
bool is_on_top;
/* screensaver system settings to be restored when vout is closed */
UINT i_spi_screensaveactive;
/* Coordinates of src and dest images (used when blitting to display) */
RECT rect_src;
RECT rect_src_clipped;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment