Fixed and issue with the startup (may work on 64-bit machines now)
git-svn-id: https://svn.code.sf.net/p/pianobooster/code/trunk@145 ba081f5d-443b-49a7-ac4b-446c3f91f371
This commit is contained in:
parent
1aea2c07cd
commit
d1628879be
|
@ -308,8 +308,6 @@ void CGLView::mouseMoveEvent(QMouseEvent *event)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void CGLView::initializeGL()
|
void CGLView::initializeGL()
|
||||||
{
|
{
|
||||||
CColour colour = Cfg::backgroundColour();
|
CColour colour = Cfg::backgroundColour();
|
||||||
|
@ -348,9 +346,13 @@ void CGLView::initializeGL()
|
||||||
}
|
}
|
||||||
|
|
||||||
setFocusPolicy(Qt::ClickFocus);
|
setFocusPolicy(Qt::ClickFocus);
|
||||||
|
m_qtWindow->init();
|
||||||
|
|
||||||
m_score->init();
|
m_score->init();
|
||||||
|
|
||||||
|
m_song->regenerateChordQueue();
|
||||||
|
|
||||||
|
|
||||||
// increased the tick time for Midi handling
|
// increased the tick time for Midi handling
|
||||||
m_timer.start(4, this ); // was 12
|
m_timer.start(4, this ); // was 12
|
||||||
m_realtime.start();
|
m_realtime.start();
|
||||||
|
|
|
@ -151,6 +151,10 @@ QtWindow::QtWindow()
|
||||||
|
|
||||||
m_song->openMidiPort(CMidiDevice::MIDI_INPUT, midiInputName);
|
m_song->openMidiPort(CMidiDevice::MIDI_INPUT, midiInputName);
|
||||||
m_song->openMidiPort(CMidiDevice::MIDI_OUTPUT,m_settings->value("midi/output").toString());
|
m_song->openMidiPort(CMidiDevice::MIDI_OUTPUT,m_settings->value("midi/output").toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
void QtWindow::init()
|
||||||
|
{
|
||||||
|
|
||||||
m_settings->loadSettings();
|
m_settings->loadSettings();
|
||||||
|
|
||||||
|
|
|
@ -58,6 +58,8 @@ public:
|
||||||
QtWindow();
|
QtWindow();
|
||||||
~QtWindow();
|
~QtWindow();
|
||||||
|
|
||||||
|
void init();
|
||||||
|
|
||||||
void songEventUpdated(int eventBits)
|
void songEventUpdated(int eventBits)
|
||||||
{
|
{
|
||||||
if ((eventBits & EVENT_BITS_playingStopped) != 0)
|
if ((eventBits & EVENT_BITS_playingStopped) != 0)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#define PB_VERSION "0.6.5.svn"
|
#define PB_VERSION "0.6.5.svn.1"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
||||||
|
|
|
@ -36,14 +36,15 @@ CScore::CScore(CSettings* settings) : CDraw(settings)
|
||||||
size_t i;
|
size_t i;
|
||||||
m_piano = new CPiano(settings);
|
m_piano = new CPiano(settings);
|
||||||
m_rating = 0;
|
m_rating = 0;
|
||||||
m_activeScroll = -1;
|
|
||||||
for (i=0; i< arraySize(m_scroll); i++)
|
for (i=0; i< arraySize(m_scroll); i++)
|
||||||
{
|
{
|
||||||
m_scroll[i] = new CScroll(i, settings);
|
m_scroll[i] = new CScroll(i, settings);
|
||||||
m_scroll[i]->setChannel(i);
|
m_scroll[i]->setChannel(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
m_activeScroll = 0;
|
m_activeScroll = -1;
|
||||||
|
m_stavesDisplayListId = 0;
|
||||||
|
m_scoreDisplayListId = 0;//glGenLists (1);
|
||||||
}
|
}
|
||||||
|
|
||||||
CScore::~CScore()
|
CScore::~CScore()
|
||||||
|
@ -62,12 +63,8 @@ CScore::~CScore()
|
||||||
m_stavesDisplayListId = 0;
|
m_stavesDisplayListId = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CScore::init()
|
void CScore::init()
|
||||||
{
|
{
|
||||||
m_activeScroll = 0;
|
|
||||||
m_scroll[m_activeScroll]->showScroll(true);
|
|
||||||
m_scoreDisplayListId = 0;//glGenLists (1);
|
|
||||||
m_stavesDisplayListId = glGenLists (1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CScore::drawScroll(bool refresh)
|
void CScore::drawScroll(bool refresh)
|
||||||
|
@ -80,10 +77,11 @@ void CScore::drawScroll(bool refresh)
|
||||||
glRectf(Cfg::scrollStartX(), topY, Cfg::getAppWidth(), bottomY);
|
glRectf(Cfg::scrollStartX(), topY, Cfg::getAppWidth(), bottomY);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (m_stavesDisplayListId == 0)
|
||||||
|
m_stavesDisplayListId = glGenLists (1);
|
||||||
|
|
||||||
if (getCompileRedrawCount())
|
if (getCompileRedrawCount())
|
||||||
{
|
{
|
||||||
if (m_stavesDisplayListId == 0)
|
|
||||||
m_stavesDisplayListId = glGenLists (1);
|
|
||||||
|
|
||||||
glNewList (m_stavesDisplayListId, GL_COMPILE_AND_EXECUTE);
|
glNewList (m_stavesDisplayListId, GL_COMPILE_AND_EXECUTE);
|
||||||
drawSymbol(CSymbol(PB_SYMBOL_playingZone, CStavePos(PB_PART_both, 0)), Cfg::playZoneX());
|
drawSymbol(CSymbol(PB_SYMBOL_playingZone, CStavePos(PB_PART_both, 0)), Cfg::playZoneX());
|
||||||
|
|
|
@ -43,7 +43,7 @@ public:
|
||||||
CScore(CSettings* settings);
|
CScore(CSettings* settings);
|
||||||
|
|
||||||
~CScore();
|
~CScore();
|
||||||
|
|
||||||
void init();
|
void init();
|
||||||
|
|
||||||
//! add a midi event to be analysed and displayed on the score
|
//! add a midi event to be analysed and displayed on the score
|
||||||
|
@ -104,7 +104,8 @@ public:
|
||||||
|
|
||||||
void setPlayedNoteColour(int note, CColour colour, int wantedDelta, int pianistTimming = NOT_USED)
|
void setPlayedNoteColour(int note, CColour colour, int wantedDelta, int pianistTimming = NOT_USED)
|
||||||
{
|
{
|
||||||
m_scroll[m_activeScroll]->setPlayedNoteColour(note, colour, wantedDelta, pianistTimming);
|
if (m_activeScroll>=0)
|
||||||
|
m_scroll[m_activeScroll]->setPlayedNoteColour(note, colour, wantedDelta, pianistTimming);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -118,13 +119,18 @@ public:
|
||||||
|
|
||||||
if (m_activeScroll != newActiveSroll)
|
if (m_activeScroll != newActiveSroll)
|
||||||
{
|
{
|
||||||
m_scroll[m_activeScroll]->showScroll(false);
|
if (m_activeScroll>=0)
|
||||||
|
m_scroll[m_activeScroll]->showScroll(false);
|
||||||
m_activeScroll = newActiveSroll;
|
m_activeScroll = newActiveSroll;
|
||||||
m_scroll[m_activeScroll]->showScroll(true);
|
m_scroll[m_activeScroll]->showScroll(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void refreshScroll() { m_scroll[m_activeScroll]->refresh(); }
|
void refreshScroll()
|
||||||
|
{
|
||||||
|
if (m_activeScroll>=0)
|
||||||
|
m_scroll[m_activeScroll]->refresh();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void setDisplayHand(whichPart_t hand)
|
void setDisplayHand(whichPart_t hand)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user