if (pthread_cond_timedwait(&cond, &mutex, &timeout) == ETIMEDOUT)
{
if (eApp && !eApp->isIdle())
- idle = 0;
+ {
+ int idle_count = eApp->idleCount();
+ if (idle_count == m_prev_idle_count)
+ idle = 0;
+ else
+ m_prev_idle_count = idle_count;
+ }
}
if (!idle)
{
if ( m_dc->islocked() )
return;
+ ASSERT(para);
gOpcode o;
o.opcode=gOpcode::renderPara;
o.dc = m_dc.grabRef();
{
if ( m_dc->islocked() )
return;
+ ASSERT(colors);
gOpcode o;
o.opcode=gOpcode::setPalette;
o.dc = m_dc.grabRef();
{
if ( m_dc->islocked() )
return;
+ ASSERT(target);
gOpcode o;
o.opcode = gOpcode::mergePalette;
o.dc = m_dc.grabRef();
m_rc->submit(o);
}
-void gPainter::end()
+void gPainter::flush()
{
if ( m_dc->islocked() )
return;
m_rc->submit(o);
}
+void gPainter::end()
+{
+ if ( m_dc->islocked() )
+ return;
+}
+
gDC::gDC()
{
m_spinner_pic = 0;
delete[] m_spinner_pic;
}
-void gDC::exec(gOpcode *o)
+void gDC::exec(const gOpcode *o)
{
switch (o->opcode)
{