mirror of https://github.com/stella-emu/stella.git
limited redraw debug output to DEBUG_BUILD
This commit is contained in:
parent
b557460fb9
commit
7a07650556
|
@ -739,8 +739,10 @@ inline bool FrameBuffer::drawMessage()
|
|||
|
||||
if(myMsg.dirty)
|
||||
{
|
||||
#ifdef DEBUG_BUILD
|
||||
cerr << "m";
|
||||
//cerr << "--- draw message ---" << endl;
|
||||
#endif
|
||||
|
||||
// Draw the bounded box and text
|
||||
const Common::Rect& dst = myMsg.surface->dstRect();
|
||||
|
|
|
@ -244,7 +244,9 @@ void Dialog::redraw(bool force)
|
|||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void Dialog::render()
|
||||
{
|
||||
#ifdef DEBUG_BUILD
|
||||
//cerr << " render " << typeid(*this).name() << endl;
|
||||
#endif
|
||||
|
||||
// Update dialog surface; also render any extra surfaces
|
||||
// Extra surfaces must be rendered afterwards, so they are drawn on top
|
||||
|
@ -263,8 +265,6 @@ void Dialog::render()
|
|||
|
||||
if(!onTop)
|
||||
{
|
||||
//cerr << " shade " << typeid(*this).name() << endl;
|
||||
|
||||
_shadeSurface->setDstRect(_surface->dstRect());
|
||||
_shadeSurface->render();
|
||||
}
|
||||
|
@ -433,8 +433,10 @@ void Dialog::drawDialog()
|
|||
|
||||
if(isDirty())
|
||||
{
|
||||
cerr << endl << "d";
|
||||
#ifdef DEBUG_BUILD
|
||||
//cerr << "*** draw dialog " << typeid(*this).name() << " ***" << endl;
|
||||
cerr << endl << "d";
|
||||
#endif
|
||||
|
||||
if(clearsBackground())
|
||||
{
|
||||
|
@ -453,7 +455,9 @@ void Dialog::drawDialog()
|
|||
}
|
||||
else {
|
||||
s.invalidate();
|
||||
#ifdef DEBUG_BUILD
|
||||
//cerr << "invalidate " << typeid(*this).name() << endl;
|
||||
#endif
|
||||
}
|
||||
if(hasBorder()) // currently only used by Dialog itself
|
||||
s.frameRect(_x, _y, _w, _h, kColor);
|
||||
|
@ -463,8 +467,10 @@ void Dialog::drawDialog()
|
|||
|
||||
clearDirty();
|
||||
}
|
||||
#ifdef DEBUG_BUILD
|
||||
else
|
||||
cerr << endl;
|
||||
#endif
|
||||
|
||||
// Draw all children
|
||||
drawChain();
|
||||
|
|
|
@ -94,8 +94,9 @@ void DialogContainer::draw(bool full)
|
|||
{
|
||||
if(myDialogStack.empty())
|
||||
return;
|
||||
|
||||
#ifdef DEBUG_BUILD
|
||||
//cerr << "draw " << full << " " << typeid(*this).name() << endl;
|
||||
#endif
|
||||
|
||||
// Draw and render all dirty dialogs
|
||||
myDialogStack.applyAll([&](Dialog*& d) {
|
||||
|
@ -118,8 +119,9 @@ void DialogContainer::render()
|
|||
{
|
||||
if(myDialogStack.empty())
|
||||
return;
|
||||
|
||||
#ifdef DEBUG_BUILD
|
||||
//cerr << "full re-render " << typeid(*this).name() << endl;
|
||||
#endif
|
||||
|
||||
// Make sure we start in a clean state (with zero'ed buffers)
|
||||
if(!myOSystem.eventHandler().inTIAMode())
|
||||
|
@ -171,7 +173,9 @@ void DialogContainer::removeDialog()
|
|||
{
|
||||
if(!myDialogStack.empty())
|
||||
{
|
||||
#ifdef DEBUG_BUILD
|
||||
//cerr << "remove dialog " << typeid(*myDialogStack.top()).name() << endl;
|
||||
#endif
|
||||
myDialogStack.pop();
|
||||
|
||||
// Inform the frame buffer that it has to render all surfaces
|
||||
|
|
|
@ -247,7 +247,6 @@ void PopUpWidget::setArrow()
|
|||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void PopUpWidget::drawWidget(bool hilite)
|
||||
{
|
||||
//cerr << "PopUpWidget::drawWidget\n";
|
||||
FBSurface& s = dialog().surface();
|
||||
|
||||
int x = _x + _labelWidth;
|
||||
|
|
|
@ -143,8 +143,6 @@ void TimeLineWidget::drawWidget(bool hilite)
|
|||
{
|
||||
FBSurface& s = _boss->dialog().surface();
|
||||
|
||||
//cerr << "TimeLineWidget::drawWidget " << typeid(s).name() << endl;
|
||||
|
||||
// Draw the label, if any
|
||||
if(_labelWidth > 0)
|
||||
s.drawString(_font, _label, _x, _y + 2, _labelWidth,
|
||||
|
|
|
@ -99,8 +99,10 @@ void Widget::draw()
|
|||
|
||||
if(isDirty())
|
||||
{
|
||||
#ifdef DEBUG_BUILD
|
||||
//cerr << " *** draw widget " << typeid(*this).name() << " ***" << endl;
|
||||
cerr << "w";
|
||||
#endif
|
||||
|
||||
FBSurface& s = _boss->dialog().surface();
|
||||
int oldX = _x, oldY = _y;
|
||||
|
@ -383,7 +385,9 @@ void Widget::setDirtyInChain(Widget* start)
|
|||
{
|
||||
while(start)
|
||||
{
|
||||
#ifdef DEBUG_BUILD
|
||||
//cerr << "setDirtyInChain " << typeid(*start).name() << endl;
|
||||
#endif
|
||||
start->setDirty();
|
||||
start = start->_next;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue