From 3d332a398d3f0284bbdad75e2e9188b6974df46c Mon Sep 17 00:00:00 2001 From: Cristian Vlasceanu Date: Wed, 20 Feb 2013 05:54:55 +0000 Subject: [PATCH] Tentative fix for autoscreenshot not showing the score board. git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7239 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- source/src/main.cpp | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/source/src/main.cpp b/source/src/main.cpp index 4a19d3fe..365cbbe6 100644 --- a/source/src/main.cpp +++ b/source/src/main.cpp @@ -1248,12 +1248,7 @@ int main(int argc, char **argv) if(lastmillis) updateworld(curtime, lastmillis); - if(needsautoscreenshot) - { - showscores(true); - addsleep(0, "screenshot"); - needsautoscreenshot = false; - } + if(needsautoscreenshot) showscores(true); serverslice(0); @@ -1269,6 +1264,18 @@ int main(int argc, char **argv) if(frames>4) SDL_GL_SwapBuffers(); } + if(needsautoscreenshot) + { + showscores(true); + // draw again after swapping buffers, to make sure menu is captured + // in the screenshot regardless of which frame buffer is current + if (!minimized) + { + gl_drawframe(screen->w, screen->h, fpshighfps ? fps/highfps : 1.0f), fps); + } + addsleep(0, "screenshot"); + needsautoscreenshot = false; + } #ifdef _DEBUG if(millis>lastflush+60000) { fflush(stdout); lastflush = millis; } #endif