]> git.sesse.net Git - vlc/blobdiff - modules/misc/inhibit.c
Fix menu removal of accelerators. This has yet to be more FIXMEd (jpeg :D)
[vlc] / modules / misc / inhibit.c
index ffc11ec347ba378a12c660e345b2e058001246b6..b2c590fd471a9b4b3fd56e9000984d8f822cca03 100644 (file)
@@ -34,7 +34,7 @@
 # include "config.h"
 #endif
 
-#include <vlc/vlc.h>
+#include <vlc_common.h>
 #include <vlc_plugin.h>
 #include <vlc_input.h>
 #include <vlc_interface.h>
@@ -63,7 +63,7 @@ struct intf_sys_t
  * Module descriptor
  *****************************************************************************/
 vlc_module_begin();
-    set_description( _("Power Management Inhibitor") );
+    set_description( N_("Power Management Inhibitor") );
     set_capability( "interface", 0 );
     set_callbacks( Activate, Deactivate );
 vlc_module_end();
@@ -227,13 +227,12 @@ static int UnInhibit( intf_thread_t *p_intf )
 static void Run( intf_thread_t *p_intf )
 {
     vlc_object_lock( p_intf );
-    for(;;)
+    while( vlc_object_alive( p_intf ) )
     {
         input_thread_t *p_input;
 
         /* Check playing state every 30 seconds */
-        if( vlc_object_timedwait( p_intf, mdate() + 30000000 ) < 0 )
-            break;
+        vlc_object_timedwait( p_intf, mdate() + 30000000 );
 
         p_input = vlc_object_find( p_intf, VLC_OBJECT_INPUT, FIND_ANYWHERE );
         if( p_input )