diff options
Diffstat (limited to 'src/client/screen.c')
| -rw-r--r-- | src/client/screen.c | 35 |
1 files changed, 22 insertions, 13 deletions
diff --git a/src/client/screen.c b/src/client/screen.c index 7f89faa..db08260 100644 --- a/src/client/screen.c +++ b/src/client/screen.c @@ -139,21 +139,30 @@ char* getScreen() void drawScreen() { - assert( currentScreen != NULL ); - -#ifdef DEBUG_TIME_DRAW - my_time_t prev; - - prev = getMyTimeMicro(); -#endif - - currentScreen->fce_draw(); + static int count = 0; - interfaceRefresh(); + count++; -#ifdef DEBUG_TIME_DRAW - printf("c draw time = %d\n", getMyTimeMicro() - prev ); -#endif + if( count == 1 ) + { + count = 0; + + assert( currentScreen != NULL ); + + #ifdef DEBUG_TIME_DRAW + my_time_t prev; + + prev = getMyTimeMicro(); + #endif + + currentScreen->fce_draw(); + + interfaceRefresh(); + + #ifdef DEBUG_TIME_DRAW + printf("c draw time = %d\n", getMyTimeMicro() - prev ); + #endif + } } |