aboutsummaryrefslogtreecommitdiff
path: root/visualization/qmpvisualization.cpp
diff options
context:
space:
mode:
authorGravatar Chris Xiong <chirs241097@gmail.com> 2023-11-26 01:10:36 -0500
committerGravatar Chris Xiong <chirs241097@gmail.com> 2023-11-26 01:10:36 -0500
commit60989e52b3f3bc0a95d3e61bd8e59fa4d9b7ab83 (patch)
treeaf08e5b6f7019c6f70bf3800a419ec78db140988 /visualization/qmpvisualization.cpp
parent382d85b15ce9cc4580a2522b39f5dd4ce43a24b0 (diff)
downloadQMidiPlayer-60989e52b3f3bc0a95d3e61bd8e59fa4d9b7ab83.tar.xz
The 2 year constipation. (mpris plugin)
Probably buggy as hell.
Diffstat (limited to 'visualization/qmpvisualization.cpp')
-rw-r--r--visualization/qmpvisualization.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/visualization/qmpvisualization.cpp b/visualization/qmpvisualization.cpp
index db896fd..8212503 100644
--- a/visualization/qmpvisualization.cpp
+++ b/visualization/qmpvisualization.cpp
@@ -904,9 +904,17 @@ bool qmpVisualization::update()
if (!rendermode)
{
if (sm->smGetKeyState(SMK_RIGHT) == SMKST_HIT)
- api->playerSeek(api->getCurrentPlaybackPercentage() + (sm->smGetKeyState(SMK_SHIFT) ? 5 : 1));
+ {
+ auto p = api->getCurrentPlaybackPercentage();
+ p += (sm->smGetKeyState(SMK_SHIFT) ? 5 : 1);
+ api->playbackControl(PlaybackControlCommand::Seek, &p);
+ }
if (sm->smGetKeyState(SMK_LEFT) == SMKST_HIT)
- api->playerSeek(api->getCurrentPlaybackPercentage() - (sm->smGetKeyState(SMK_SHIFT) ? 5 : 1));
+ {
+ auto p = api->getCurrentPlaybackPercentage();
+ p -= (sm->smGetKeyState(SMK_SHIFT) ? 5 : 1);
+ api->playbackControl(PlaybackControlCommand::Seek, &p);
+ }
if (sm->smGetKeyState(SMK_B) == SMKST_HIT)
debug ^= 1;
}