diff options
Diffstat (limited to 'src/plugins/General/gnomehotkey')
| -rw-r--r-- | src/plugins/General/gnomehotkey/mediakeys.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/plugins/General/gnomehotkey/mediakeys.cpp b/src/plugins/General/gnomehotkey/mediakeys.cpp index 0a371ca97..db196cd11 100644 --- a/src/plugins/General/gnomehotkey/mediakeys.cpp +++ b/src/plugins/General/gnomehotkey/mediakeys.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2014 by Ilya Kotov * + * Copyright (C) 2014-2015 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -105,7 +105,12 @@ void MediaKeys::onKeyPressed(const QString &in0, const QString &in1) SoundCore *core = SoundCore::instance(); qDebug("MediaKeys: [%s] pressed", qPrintable(in1)); if(in1 == "Play") - player->play(); + { + if (core->state() == Qmmp::Stopped) + player->play(); + else if (core->state() != Qmmp::FatalError) + core->pause(); + } else if(in1 == "Pause") core->pause(); else if(in1 == "Stop") |
