diff options
Diffstat (limited to 'src')
| -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 }; |
