[vlc-commits] vout: win32: Remove screensaver inhnibition code
Hugo Beauzée-Luyssen
git at videolan.org
Thu Jan 25 18:14:47 CET 2018
vlc/vlc-3.0 | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Thu Jan 25 18:13:01 2018 +0100| [84d65524b99c09778703ff257465b4c9aad19df3] | committer: Hugo Beauzée-Luyssen
vout: win32: Remove screensaver inhnibition code
(manually cherry-picked from commit ad7a10447e65cda91a674a6aac5a7c68be614755)
Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=84d65524b99c09778703ff257465b4c9aad19df3
---
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 83807a4fad..f4787d20c3 100644
--- a/modules/video_output/win32/common.c
+++ b/modules/video_output/win32/common.c
@@ -55,9 +55,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);
@@ -120,7 +117,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"));
@@ -351,8 +347,6 @@ void CommonClean(vout_display_t *vd)
EventThreadDestroy(sys->event);
}
- RestoreScreensaver(vd);
-
#if !defined(NDEBUG) && defined(HAVE_DXGIDEBUG_H)
HRESULT (WINAPI * pf_DXGIGetDebugInterface)(const GUID *riid, void **ppDebug);
if (sys->dxgidebug_dll) {
@@ -607,34 +601,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