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:
louisjb 2010-07-16 22:52:24 +00:00
parent 1aea2c07cd
commit d1628879be
6 changed files with 28 additions and 16 deletions

View File

@ -308,8 +308,6 @@ void CGLView::mouseMoveEvent(QMouseEvent *event)
{
}
void CGLView::initializeGL()
{
CColour colour = Cfg::backgroundColour();
@ -348,9 +346,13 @@ void CGLView::initializeGL()
}
setFocusPolicy(Qt::ClickFocus);
m_qtWindow->init();
m_score->init();
m_song->regenerateChordQueue();
// increased the tick time for Midi handling
m_timer.start(4, this ); // was 12
m_realtime.start();

View File

@ -151,6 +151,10 @@ QtWindow::QtWindow()
m_song->openMidiPort(CMidiDevice::MIDI_INPUT, midiInputName);
m_song->openMidiPort(CMidiDevice::MIDI_OUTPUT,m_settings->value("midi/output").toString());
}
void QtWindow::init()
{
m_settings->loadSettings();

View File

@ -58,6 +58,8 @@ public:
QtWindow();
~QtWindow();
void init();
void songEventUpdated(int eventBits)
{
if ((eventBits & EVENT_BITS_playingStopped) != 0)

View File

@ -1,4 +1,4 @@
#define PB_VERSION "0.6.5.svn"
#define PB_VERSION "0.6.5.svn.1"
/*

View File

@ -36,14 +36,15 @@ CScore::CScore(CSettings* settings) : CDraw(settings)
size_t i;
m_piano = new CPiano(settings);
m_rating = 0;
m_activeScroll = -1;
for (i=0; i< arraySize(m_scroll); i++)
{
m_scroll[i] = new CScroll(i, settings);
m_scroll[i]->setChannel(i);
}
m_activeScroll = 0;
m_activeScroll = -1;
m_stavesDisplayListId = 0;
m_scoreDisplayListId = 0;//glGenLists (1);
}
CScore::~CScore()
@ -62,12 +63,8 @@ CScore::~CScore()
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)
@ -80,10 +77,11 @@ void CScore::drawScroll(bool refresh)
glRectf(Cfg::scrollStartX(), topY, Cfg::getAppWidth(), bottomY);
}
if (m_stavesDisplayListId == 0)
m_stavesDisplayListId = glGenLists (1);
if (getCompileRedrawCount())
{
if (m_stavesDisplayListId == 0)
m_stavesDisplayListId = glGenLists (1);
glNewList (m_stavesDisplayListId, GL_COMPILE_AND_EXECUTE);
drawSymbol(CSymbol(PB_SYMBOL_playingZone, CStavePos(PB_PART_both, 0)), Cfg::playZoneX());

View File

@ -43,7 +43,7 @@ public:
CScore(CSettings* settings);
~CScore();
void init();
//! 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)
{
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)
{
m_scroll[m_activeScroll]->showScroll(false);
if (m_activeScroll>=0)
m_scroll[m_activeScroll]->showScroll(false);
m_activeScroll = newActiveSroll;
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)