Commit b0ea1893 authored by Alex Helfet's avatar Alex Helfet Committed by Jean-Baptiste Kempf

Win32: added config option to disable volume keys.

Cherry-picked from b4ca80b9b1dcd529be276d46961fd40749b3f5d8
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 32312b04
...@@ -182,7 +182,18 @@ bool MainInterface::winEvent ( MSG * msg, long * result ) ...@@ -182,7 +182,18 @@ bool MainInterface::winEvent ( MSG * msg, long * result )
break; break;
case WM_APPCOMMAND: case WM_APPCOMMAND:
cmd = GET_APPCOMMAND_LPARAM(msg->lParam); cmd = GET_APPCOMMAND_LPARAM(msg->lParam);
bool disable_volume_keys = var_InheritBool( p_intf, "qt-disable-volume-keys" );
if( disable_volume_keys &&
( cmd == APPCOMMAND_VOLUME_DOWN ||
cmd == APPCOMMAND_VOLUME_UP ||
cmd == APPCOMMAND_VOLUME_MUTE ) )
{
break;
}
*result = TRUE; *result = TRUE;
switch(cmd) switch(cmd)
{ {
case APPCOMMAND_MEDIA_PLAY_PAUSE: case APPCOMMAND_MEDIA_PLAY_PAUSE:
......
...@@ -164,6 +164,12 @@ static void ShowDialog ( intf_thread_t *, int, int, intf_dialog_args_t * ); ...@@ -164,6 +164,12 @@ static void ShowDialog ( intf_thread_t *, int, int, intf_dialog_args_t * );
#define QT_MINIMAL_MODE_TEXT N_("Start in minimal view (without menus)" ) #define QT_MINIMAL_MODE_TEXT N_("Start in minimal view (without menus)" )
#define QT_DISABLE_VOLUME_KEYS_TEXT N_( "Ignore keyboard volume buttons." )
#define QT_DISABLE_VOLUME_KEYS_LONGTEXT N_( \
"With this option checked, the volume up, volume down and mute buttons on your " \
"keyboard will always change your system volume. With this option unchecked, the " \
"volume buttons will change VLC's volume when VLC is selected and change the " \
"system volume when VLC is not selected." )
/**********************************************************************/ /**********************************************************************/
vlc_module_begin () vlc_module_begin ()
set_shortname( "Qt" ) set_shortname( "Qt" )
...@@ -236,6 +242,15 @@ vlc_module_begin () ...@@ -236,6 +242,15 @@ vlc_module_begin ()
QT_AUTOLOAD_EXTENSIONS_TEXT, QT_AUTOLOAD_EXTENSIONS_LONGTEXT, QT_AUTOLOAD_EXTENSIONS_TEXT, QT_AUTOLOAD_EXTENSIONS_LONGTEXT,
false ) false )
#ifdef WIN32
add_bool( "qt-disable-volume-keys" /* name */,
false /* default value */,
NULL,
QT_DISABLE_VOLUME_KEYS_TEXT /* text */,
QT_DISABLE_VOLUME_KEYS_LONGTEXT /* longtext */,
false /* advanced mode only */)
#endif
add_obsolete_bool( "qt-blingbling" ) /* Suppressed since 1.0.0 */ add_obsolete_bool( "qt-blingbling" ) /* Suppressed since 1.0.0 */
add_obsolete_integer( "qt-display-mode" ) /* Suppressed since 1.1.0 */ add_obsolete_integer( "qt-display-mode" ) /* Suppressed since 1.1.0 */
......
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