[vlc-commits] vout: win32: Remove screensaver inhnibition code

Hugo Beauzée-Luyssen git at videolan.org
Wed Jan 24 11:07:12 CET 2018


vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Wed Jan 24 10:51:45 2018 +0100| [ad7a10447e65cda91a674a6aac5a7c68be614755] | committer: Hugo Beauzée-Luyssen

vout: win32: Remove screensaver inhnibition code

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ad7a10447e65cda91a674a6aac5a7c68be614755
---

 modules/video_output/win32/common.c | 34 ----------------------------------
 modules/video_output/win32/common.h |  3 ---
 2 files changed, 37 deletions(-)

diff --git a/modules/video_output/win32/common.c b/modules/video_output/win32/common.c
index 1993cebb5b..611554f9bc 100644
--- a/modules/video_output/win32/common.c
+++ b/modules/video_output/win32/common.c
@@ -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) {
diff --git a/modules/video_output/win32/common.h b/modules/video_output/win32/common.h
index c1c6e6f368..0fb4e93c02 100644
--- a/modules/video_output/win32/common.h
+++ b/modules/video_output/win32/common.h
@@ -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;



More information about the vlc-commits mailing list