diff options
author | Craig Andrews <candrews@gentoo.org> | 2018-11-05 12:26:03 -0500 |
---|---|---|
committer | Craig Andrews <candrews@gentoo.org> | 2018-11-05 12:35:05 -0500 |
commit | 310b1208092ade67b6d5f385d5737f0fcdd6a96e (patch) | |
tree | b5e8a8bc8ec3f0a6b1953c28da18dbc4dfd4c08a /media-libs/libprojectm/files | |
parent | dev-python/cachetools: 3.0.0 bump (diff) | |
download | gentoo-310b1208092ade67b6d5f385d5737f0fcdd6a96e.tar.gz gentoo-310b1208092ade67b6d5f385d5737f0fcdd6a96e.tar.bz2 gentoo-310b1208092ade67b6d5f385d5737f0fcdd6a96e.zip |
media-libs/libprojectm: 3.1.0 version bump
Package-Manager: Portage-2.3.51, Repoman-2.3.12
Signed-off-by: Craig Andrews <candrews@gentoo.org>
Diffstat (limited to 'media-libs/libprojectm/files')
-rw-r--r-- | media-libs/libprojectm/files/libprojectm-3.1.0-datadir.patch | 149 |
1 files changed, 149 insertions, 0 deletions
diff --git a/media-libs/libprojectm/files/libprojectm-3.1.0-datadir.patch b/media-libs/libprojectm/files/libprojectm-3.1.0-datadir.patch new file mode 100644 index 000000000000..8968f512baec --- /dev/null +++ b/media-libs/libprojectm/files/libprojectm-3.1.0-datadir.patch @@ -0,0 +1,149 @@ +https://github.com/projectM-visualizer/projectm/pull/112 +diff --git a/src/libprojectM/Renderer/Renderer.cpp b/src/libprojectM/Renderer/Renderer.cpp +index 82ae81a..5da27fc 100644 +--- a/src/libprojectM/Renderer/Renderer.cpp ++++ b/src/libprojectM/Renderer/Renderer.cpp +@@ -20,9 +20,9 @@ Pipeline* Renderer::currentPipe; + class Preset; + + Renderer::Renderer(int width, int height, int gx, int gy, BeatDetect *_beatDetect, std::string _presetURL, +- std::string _titlefontURL, std::string _menufontURL) : ++ std::string _titlefontURL, std::string _menufontURL, const std::string& datadir) : + title_fontURL(_titlefontURL), menu_fontURL(_menufontURL), presetURL(_presetURL), m_presetName("None"), vw(width), +- vh(height), mesh(gx, gy) ++ vh(height), mesh(gx, gy), m_datadir(datadir) + { + this->totalframes = 1; + this->noSwitch = false; +@@ -463,7 +463,7 @@ void Renderer::reset(int w, int h) + if (textureManager != NULL) { + delete textureManager; + } +- textureManager = new TextureManager(presetURL, texsizeX, texsizeY); ++ textureManager = new TextureManager(presetURL, texsizeX, texsizeY, m_datadir); + + shaderEngine.setParams(texsizeX, texsizeY, beatDetect, textureManager); + shaderEngine.reset(); +diff --git a/src/libprojectM/Renderer/Renderer.hpp b/src/libprojectM/Renderer/Renderer.hpp +index f525c7c..7d2c00e 100644 +--- a/src/libprojectM/Renderer/Renderer.hpp ++++ b/src/libprojectM/Renderer/Renderer.hpp +@@ -67,7 +67,7 @@ public: + float m_fInvAspectX; + float m_fInvAspectY; + +- Renderer(int width, int height, int gx, int gy, BeatDetect *_beatDetect, std::string presetURL, std::string title_fontURL, std::string menu_fontURL); ++ Renderer(int width, int height, int gx, int gy, BeatDetect *_beatDetect, std::string presetURL, std::string title_fontURL, std::string menu_fontURL, const std::string& datadir = ""); + ~Renderer(); + + void RenderFrame(const Pipeline &pipeline, const PipelineContext &pipelineContext); +@@ -98,6 +98,7 @@ private: + //per pixel equation variables + ShaderEngine shaderEngine; + std::string m_presetName; ++ std::string m_datadir; + + float* p; + +diff --git a/src/libprojectM/Renderer/TextureManager.cpp b/src/libprojectM/Renderer/TextureManager.cpp +index 2905838..b87196a 100644 +--- a/src/libprojectM/Renderer/TextureManager.cpp ++++ b/src/libprojectM/Renderer/TextureManager.cpp +@@ -29,7 +29,7 @@ + #define NUM_BLUR_TEX 6 + + +-TextureManager::TextureManager(const std::string _presetsURL, const int texsizeX, const int texsizeY): ++TextureManager::TextureManager(const std::string _presetsURL, const int texsizeX, const int texsizeY, std::string datadir): + presetsURL(_presetsURL) + { + extensions.push_back(".jpg"); +@@ -40,9 +40,11 @@ TextureManager::TextureManager(const std::string _presetsURL, const int texsizeX + extensions.push_back(".dib"); + + Preload(); ++ if (datadir.empty()) ++ datadir = DATADIR_PATH; + +- loadTextureDir(std::string(DATADIR_PATH) + "/presets"); +- loadTextureDir(std::string(DATADIR_PATH) + "/textures"); ++ loadTextureDir(datadir + "/presets"); ++ loadTextureDir(datadir + "/textures"); + loadTextureDir(_presetsURL); + + // Create main texture ans associated samplers +diff --git a/src/libprojectM/Renderer/TextureManager.hpp b/src/libprojectM/Renderer/TextureManager.hpp +index b1a7982..10b68e6 100644 +--- a/src/libprojectM/Renderer/TextureManager.hpp ++++ b/src/libprojectM/Renderer/TextureManager.hpp +@@ -23,7 +23,8 @@ class TextureManager + std::vector<std::string> extensions; + + public: +- TextureManager(std::string _presetsURL, const int texsizeX, const int texsizeY); ++ TextureManager(std::string _presetsURL, const int texsizeX, const int texsizeY, ++ std::string datadir = ""); + ~TextureManager(); + + void Clear(); +diff --git a/src/libprojectM/projectM.cpp b/src/libprojectM/projectM.cpp +index 00377a5..bb71aa0 100755 +--- a/src/libprojectM/projectM.cpp ++++ b/src/libprojectM/projectM.cpp +@@ -134,7 +134,7 @@ beatDetect ( 0 ), renderer ( 0 ), _pcm(0), m_presetPos(0), m_flags(flags), _pip + + } + +-projectM::projectM(Settings settings, int flags): ++projectM::projectM(Settings& settings, int flags): + beatDetect ( 0 ), renderer ( 0 ), _pcm(0), m_presetPos(0), m_flags(flags), _pipelineContext(new PipelineContext()), _pipelineContext2(new PipelineContext()), + timeKeeper(NULL), _matcher(NULL), _merger(NULL) + { +@@ -267,6 +267,7 @@ void projectM::readSettings (const Settings & settings ) + _settings.titleFontURL = settings.titleFontURL; + _settings.menuFontURL = settings.menuFontURL; + _settings.shuffleEnabled = settings.shuffleEnabled; ++ _settings.datadir = settings.datadir; + + _settings.easterEgg = settings.easterEgg; + +@@ -512,7 +513,7 @@ static void *thread_callback(void *prjm) { + mspf= ( int ) ( 1000.0/ ( float ) _settings.fps ); + else mspf = 0; + +- this->renderer = new Renderer ( width, height, gx, gy, beatDetect, settings().presetURL, settings().titleFontURL, settings().menuFontURL ); ++ this->renderer = new Renderer ( width, height, gx, gy, beatDetect, settings().presetURL, settings().titleFontURL, settings().menuFontURL, settings().datadir ); + + running = true; + +@@ -931,7 +932,8 @@ void projectM::changeTextureSize(int size) { + renderer = new Renderer(_settings.windowWidth, _settings.windowHeight, + _settings.meshX, _settings.meshY, + beatDetect, _settings.presetURL, +- _settings.titleFontURL, _settings.menuFontURL); ++ _settings.titleFontURL, _settings.menuFontURL, ++ _settings.datadir); + } + + void projectM::changePresetDuration(int seconds) { +diff --git a/src/libprojectM/projectM.hpp b/src/libprojectM/projectM.hpp +index 7339c8f..de7cd1d 100755 +--- a/src/libprojectM/projectM.hpp ++++ b/src/libprojectM/projectM.hpp +@@ -128,6 +128,7 @@ public: + std::string presetURL; + std::string titleFontURL; + std::string menuFontURL; ++ std::string datadir; + int smoothPresetDuration; + int presetDuration; + float beatSensitivity; +@@ -153,7 +154,7 @@ public: + }; + + projectM(std::string config_file, int flags = FLAG_NONE); +- projectM(Settings settings, int flags = FLAG_NONE); ++ projectM(Settings& settings, int flags = FLAG_NONE); + + //DLLEXPORT projectM(int gx, int gy, int fps, int texsize, int width, int height,std::string preset_url,std::string title_fonturl, std::string title_menuurl); + |