diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2019-02-13 19:00:40 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2019-02-13 19:00:40 +0000 |
| commit | 60f87adeda0d76850b61324f484b7e40832e19e7 (patch) | |
| tree | cc44c3f12ae45b38c9280fc0284f0aaeeabd7132 /src/plugins/Visual/projectm | |
| parent | abfbd83fffa2da41d3d95c4ba3a77a14e2554d4a (diff) | |
| download | qmmp-60f87adeda0d76850b61324f484b7e40832e19e7.tar.gz qmmp-60f87adeda0d76850b61324f484b7e40832e19e7.tar.bz2 qmmp-60f87adeda0d76850b61324f484b7e40832e19e7.zip | |
added projectm 3.1 support (#998)
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@8708 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/Visual/projectm')
| -rw-r--r-- | src/plugins/Visual/projectm/CMakeLists.txt | 6 | ||||
| -rw-r--r-- | src/plugins/Visual/projectm/projectm.pro | 2 | ||||
| -rw-r--r-- | src/plugins/Visual/projectm/projectmwrapper.cpp | 10 | ||||
| -rw-r--r-- | src/plugins/Visual/projectm/projectmwrapper.h | 6 |
4 files changed, 22 insertions, 2 deletions
diff --git a/src/plugins/Visual/projectm/CMakeLists.txt b/src/plugins/Visual/projectm/CMakeLists.txt index 6e724723b..15697f879 100644 --- a/src/plugins/Visual/projectm/CMakeLists.txt +++ b/src/plugins/Visual/projectm/CMakeLists.txt @@ -15,6 +15,12 @@ ELSE(${Qt5Gui_OPENGL_IMPLEMENTATION} STREQUAL GL) MESSAGE(WARNING "Unsuppoted OpenGL implementation, projectM disabled") ENDIF(${Qt5Gui_OPENGL_IMPLEMENTATION} STREQUAL GL) +pkg_search_module(PROJECTM_31 libprojectM>=3.1.0) + +IF(PROJECTM_31_FOUND) +ADD_DEFINITIONS(-DPROJECTM_31) +ENDIF(PROJECTM_31_FOUND) + find_file(PROJECTM_CONFIG config.inp PATHS "/usr/share/projectM/" "/usr/local/share/projectM/") diff --git a/src/plugins/Visual/projectm/projectm.pro b/src/plugins/Visual/projectm/projectm.pro index 171650a78..042a881e3 100644 --- a/src/plugins/Visual/projectm/projectm.pro +++ b/src/plugins/Visual/projectm/projectm.pro @@ -13,6 +13,8 @@ SOURCES += projectmplugin.cpp \ RESOURCES = translations/translations.qrc +#DEFINES += PROJECTM_31 + unix { PKGCONFIG += libprojectM target.path = $$PLUGIN_DIR/Visual diff --git a/src/plugins/Visual/projectm/projectmwrapper.cpp b/src/plugins/Visual/projectm/projectmwrapper.cpp index eb8a2d07e..a9022f3ad 100644 --- a/src/plugins/Visual/projectm/projectmwrapper.cpp +++ b/src/plugins/Visual/projectm/projectmwrapper.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2013 by Ilya Kotov * + * Copyright (C) 2013-2019 by Ilya Kotov * * forkotov02@ya.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -40,8 +40,16 @@ void ProjectMWrapper::selectPreset(int index) projectM::selectPreset(index); } +#ifdef PROJECTM_31 +void ProjectMWrapper::presetSwitchedEvent(bool isHardCut, size_t index) const +{ + Q_UNUSED(isHardCut); + emit currentPresetChanged(index); +} +#else void ProjectMWrapper::presetSwitchedEvent(bool isHardCut, unsigned int index) const { Q_UNUSED(isHardCut); emit currentPresetChanged(index); } +#endif diff --git a/src/plugins/Visual/projectm/projectmwrapper.h b/src/plugins/Visual/projectm/projectmwrapper.h index 1fe947499..25f9546d1 100644 --- a/src/plugins/Visual/projectm/projectmwrapper.h +++ b/src/plugins/Visual/projectm/projectmwrapper.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2013 by Ilya Kotov * + * Copyright (C) 2013-2019 by Ilya Kotov * * forkotov02@ya.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -40,7 +40,11 @@ public slots: void selectPreset(int index); private: +#ifdef PROJECTM_31 + void presetSwitchedEvent(bool isHardCut, size_t index) const override; +#else void presetSwitchedEvent(bool isHardCut, unsigned int index) const override; +#endif }; |
