]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/input_manager.cpp
Win32: add support for play and pause buttons in media keys (different from a plya...
[vlc] / modules / gui / qt4 / input_manager.cpp
index 919f154a0c91b31b7045b1b9a620ca469b664db2..1650d4e90c33d15cec13bfe6e1e5fc4cf1c7cdca 100644 (file)
@@ -1058,6 +1058,28 @@ void MainInputManager::togglePlayPause()
         getIM()->togglePlayPause();
 }
 
+void MainInputManager::play()
+{
+    /* No input, play */
+    if( !p_input )
+        playlist_Play( THEPL );
+    else
+    {
+        if( PLAYING_S != var_GetInteger( p_input, "state" ) )
+        {
+            getIM()->togglePlayPause();
+        }
+    }
+}
+
+void MainInputManager::pause()
+{
+    if(p_input && PLAYING_S == var_GetInteger( p_input, "state" ) )
+    {
+        getIM()->togglePlayPause();
+    }
+}
+
 void MainInputManager::toggleRandom()
 {
     var_ToggleBool( THEPL, "random" );