diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2014-02-09 10:11:37 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2014-02-09 10:11:37 +0000 |
| commit | d81a31df5bc58994a151a53074b739589c21a28b (patch) | |
| tree | 90ae95d6ea531453d04a5aef638fe252e0590888 /src/plugins/Visual/projectm/projectmwidget.cpp | |
| parent | 9dd681456966f54dd71bb8804520d99f22c7dba7 (diff) | |
| download | qmmp-d81a31df5bc58994a151a53074b739589c21a28b.tar.gz qmmp-d81a31df5bc58994a151a53074b739589c21a28b.tar.bz2 qmmp-d81a31df5bc58994a151a53074b739589c21a28b.zip | |
projectm plugin: added mingw support
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@4067 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/Visual/projectm/projectmwidget.cpp')
| -rw-r--r-- | src/plugins/Visual/projectm/projectmwidget.cpp | 35 |
1 files changed, 30 insertions, 5 deletions
diff --git a/src/plugins/Visual/projectm/projectmwidget.cpp b/src/plugins/Visual/projectm/projectmwidget.cpp index 7de1ca867..6b9cbdb82 100644 --- a/src/plugins/Visual/projectm/projectmwidget.cpp +++ b/src/plugins/Visual/projectm/projectmwidget.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2009-2013 by Ilya Kotov * + * Copyright (C) 2009-2014 by Ilya Kotov * * forkotov02@hotmail.ru * * * * Copyright (C) 2007 by projectM team * @@ -40,11 +40,13 @@ ProjectMWidget::ProjectMWidget(QWidget *parent) { setMouseTracking(true); m_projectM = 0; - QTimer *timer = new QTimer(this); - connect(timer, SIGNAL(timeout()),SLOT(updateGL ())); - timer->start(0); + m_timer = new QTimer(this); + connect(m_timer, SIGNAL(timeout()),SLOT(updateGL ())); m_menu = new QMenu(this); connect(SoundCore::instance(), SIGNAL(metaDataChanged()), SLOT(updateTitle())); + qDebug("ProjectMWidget: opengl version: %d.%d", + context()->format().majorVersion(), + context()->format().minorVersion()); } @@ -81,10 +83,32 @@ void ProjectMWidget::initializeGL() glEnable(GL_POINT_SMOOTH); glClearColor(0.0f, 0.0f, 0.0f, 0.0f); glLineStipple(2, 0xAAAA); + if (!m_projectM) { +#ifdef Q_OS_WIN + projectM::Settings settings; + settings.meshX = 32; + settings.meshY = 24; + settings.fps = 35; + settings.textureSize = 1024; + settings.windowWidth = 512; + settings.windowHeight = 512; + settings.presetURL = "D:/devel/mingw32-libs/share/projectM/presets"; + settings.titleFontURL = "D:/devel/mingw32-libs/share/projectM/fonts"; + settings.menuFontURL = "D:/devel/mingw32-libs/share/projectM/fonts"; + settings.smoothPresetDuration = 5; + settings.presetDuration = 30; + settings.beatSensitivity = 1.0; + settings.aspectCorrection = true; + settings.easterEgg = 1.0; + settings.shuffleEnabled = false; + settings.softCutRatingsEnabled = false; + m_projectM = new projectM(settings, projectM::FLAG_DISABLE_PLAYLIST_LOAD); +#else m_projectM = new projectM(PROJECTM_CONFIG, projectM::FLAG_DISABLE_PLAYLIST_LOAD); - QString presetPath (m_projectM->settings().presetURL.c_str()); +#endif + QString presetPath = QString::fromLocal8Bit(m_projectM->settings().presetURL.c_str()); QDir presetDir(presetPath); presetDir.setFilter(QDir::Files); QStringList filters; @@ -105,6 +129,7 @@ void ProjectMWidget::initializeGL() } createActions(); updateTitle(); + m_timer->start(0); } } |
