diff options
Diffstat (limited to 'visualization')
-rw-r--r-- | visualization/qmpvisualization.cpp | 12 | ||||
-rw-r--r-- | visualization/renderer/qmppluginapistub.cpp | 12 | ||||
-rw-r--r-- | visualization/renderer/qmppluginapistub.hpp | 3 |
3 files changed, 25 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; } diff --git a/visualization/renderer/qmppluginapistub.cpp b/visualization/renderer/qmppluginapistub.cpp index 6c6424c..7804cc6 100644 --- a/visualization/renderer/qmppluginapistub.cpp +++ b/visualization/renderer/qmppluginapistub.cpp @@ -98,6 +98,16 @@ std::wstring qmpPluginAPIStub::getWTitle() core->settings()->getOptionEnumIntOptName("Midi/TextEncoding").c_str())-> toUnicode(core->player->getTitle()).toStdWString(); } + +std::string qmpPluginAPIStub::getFilePath() +{ + return ""; +} + +std::wstring qmpPluginAPIStub::getWFilePath() +{ + return L""; +} std::string qmpPluginAPIStub::getChannelPresetString(int ch) { return std::string(); @@ -110,6 +120,8 @@ void *qmpPluginAPIStub::getMainWindow() { return nullptr; } + +void qmpPluginAPIStub::playbackControl(PlaybackControlCommand cmd, void *data) {} void qmpPluginAPIStub::discardCurrentEvent() {} void qmpPluginAPIStub::commitEventChange(SEvent d) {} void qmpPluginAPIStub::callEventReaderCB(SEvent d) {} diff --git a/visualization/renderer/qmppluginapistub.hpp b/visualization/renderer/qmppluginapistub.hpp index ede08d3..675a306 100644 --- a/visualization/renderer/qmppluginapistub.hpp +++ b/visualization/renderer/qmppluginapistub.hpp @@ -29,9 +29,12 @@ public: bool getChannelMask(int ch); std::string getTitle(); std::wstring getWTitle(); + std::string getFilePath(); + std::wstring getWFilePath(); std::string getChannelPresetString(int ch); bool isDarkTheme(); void *getMainWindow(); + void playbackControl(PlaybackControlCommand cmd, void* data); void discardCurrentEvent(); void commitEventChange(SEvent d); |