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); |