[vlc-commits] commit: Windows: remove another call to GetProcAddress in vout plugins ( Geoffroy Couprie )
git at videolan.org
git at videolan.org
Thu Nov 4 19:57:07 CET 2010
vlc | branch: master | Geoffroy Couprie <geal at videolan.org> | Thu Nov 4 16:51:50 2010 +0100| [e68cc628e8769bfe23a4422d9514d27e1abbe704] | committer: Jean-Baptiste Kempf
Windows: remove another call to GetProcAddress in vout plugins
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e68cc628e8769bfe23a4422d9514d27e1abbe704
---
modules/video_output/msw/events.c | 17 ++---------------
1 files changed, 2 insertions(+), 15 deletions(-)
diff --git a/modules/video_output/msw/events.c b/modules/video_output/msw/events.c
index 46c15c4..def6f7e 100644
--- a/modules/video_output/msw/events.c
+++ b/modules/video_output/msw/events.c
@@ -224,7 +224,6 @@ static void *EventThread( void *p_this )
vout_display_t *vd = p_event->vd;
MSG msg;
POINT old_mouse_pos = {0,0}, mouse_pos;
- HMODULE hkernel32;
int canc = vlc_savecancel ();
bool b_mouse_support = var_InheritBool( p_event->vd, "mouse-events" );
@@ -250,20 +249,8 @@ static void *EventThread( void *p_this )
}
#ifndef UNDER_CE
- /* Set power management stuff */
- if( (hkernel32 = GetModuleHandle( _T("KERNEL32") ) ) )
- {
- ULONG (WINAPI* OurSetThreadExecutionState)( ULONG );
-
- OurSetThreadExecutionState = (ULONG (WINAPI*)( ULONG ))
- GetProcAddress( hkernel32, _T("SetThreadExecutionState") );
-
- if( OurSetThreadExecutionState )
- /* Prevent monitor from powering off */
- OurSetThreadExecutionState( ES_DISPLAY_REQUIRED | ES_CONTINUOUS );
- else
- msg_Dbg( vd, "no support for SetThreadExecutionState()" );
- }
+ /* Prevent monitor from powering off */
+ SetThreadExecutionState( ES_DISPLAY_REQUIRED | ES_CONTINUOUS );
#endif
/* Main loop */
More information about the vlc-commits
mailing list