Commit 091be37c authored by Gildas Bazin's avatar Gildas Bazin

* modules/video_output/directx/events.c: fix to disable the screensaver in...

* modules/video_output/directx/events.c: fix to disable the screensaver in embedded mode when in fullscreen.
parent 6a13a256
...@@ -711,6 +711,14 @@ static long FAR PASCAL DirectXEventProc( HWND hwnd, UINT message, ...@@ -711,6 +711,14 @@ static long FAR PASCAL DirectXEventProc( HWND hwnd, UINT message,
p_vout = (vout_thread_t *)GetWindowLongPtr( hwnd, GWLP_USERDATA ); p_vout = (vout_thread_t *)GetWindowLongPtr( hwnd, GWLP_USERDATA );
} }
/* Catch the screensaver and the monitor turn-off */
if( message == WM_SYSCOMMAND &&
( wParam == SC_SCREENSAVE || wParam == SC_MONITORPOWER ) )
{
//if( p_vout ) msg_Dbg( p_vout, "WinProc WM_SYSCOMMAND screensaver" );
return 0; /* this stops them from happening */
}
if( !p_vout ) if( !p_vout )
{ {
/* Hmmm mozilla does manage somehow to save the pointer to our /* Hmmm mozilla does manage somehow to save the pointer to our
...@@ -754,23 +762,16 @@ static long FAR PASCAL DirectXEventProc( HWND hwnd, UINT message, ...@@ -754,23 +762,16 @@ static long FAR PASCAL DirectXEventProc( HWND hwnd, UINT message,
case WM_SYSCOMMAND: case WM_SYSCOMMAND:
switch (wParam) switch (wParam)
{ {
case SC_SCREENSAVE: /* catch the screensaver */
case SC_MONITORPOWER: /* catch the monitor turn-off */
msg_Dbg( p_vout, "WinProc WM_SYSCOMMAND" );
return 0; /* this stops them from happening */
case IDM_TOGGLE_ON_TOP: /* toggle the "on top" status */ case IDM_TOGGLE_ON_TOP: /* toggle the "on top" status */
{ {
vlc_value_t val; vlc_value_t val;
msg_Dbg( p_vout, "WinProc WM_SYSCOMMAND: IDM_TOGGLE_ON_TOP"); msg_Dbg( p_vout, "WinProc WM_SYSCOMMAND: IDM_TOGGLE_ON_TOP");
/* Get the current value... */ /* Change the current value */
if( var_Get( p_vout, "video-on-top", &val ) < 0 ) var_Get( p_vout, "video-on-top", &val );
return 0;
/* ...and change it */
val.b_bool = !val.b_bool; val.b_bool = !val.b_bool;
var_Set( p_vout, "video-on-top", val ); var_Set( p_vout, "video-on-top", val );
return 0; return 0;
break;
} }
} }
break; break;
......
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