test/sandbox.c

changeset 22
30b12e88fd84
parent 19
d0e88022e209
child 23
ab07757004b4
equal deleted inserted replaced
21:1a47c57666f5 22:30b12e88fd84
65 // fps counter 65 // fps counter
66 if (asc_context.elapsed_millis > 0) { 66 if (asc_context.elapsed_millis > 0) {
67 unsigned fps = 1000u / asc_context.elapsed_millis; 67 unsigned fps = 1000u / asc_context.elapsed_millis;
68 if (fps != last_fps) { 68 if (fps != last_fps) {
69 last_fps = fps; 69 last_fps = fps;
70 cxBufferClear(&fps_counter->text); 70 cxBufferReset(&fps_counter->text);
71 cx_bprintf(&fps_counter->text, "%u FPS", fps); 71 cx_bprintf(&fps_counter->text, "%u FPS", fps);
72 asc_text_update(fps_counter); 72 asc_text_update(fps_counter);
73 } 73 }
74 } 74 }
75 asc_text_draw(fps_counter); 75 asc_text_draw(fps_counter);

mercurial