| 748 | } |
| 749 | |
| 750 | void ShowFPS(void) |
| 751 | { |
| 752 | if (Show_FPS == false) |
| 753 | { |
| 754 | return; |
| 755 | } |
| 756 | static char fpsmsg[16] = { 0 }; |
| 757 | uint64 ts = FCEUD_GetTime(); |
| 758 | uint64 da; |
| 759 | |
| 760 | if ( boop_ts == 0 ) |
| 761 | { |
| 762 | boop_ts = ts; |
| 763 | } |
| 764 | da = ts - boop_ts; |
| 765 | |
| 766 | if ( da > FCEUD_GetTimeFreq() ) |
| 767 | { |
| 768 | sprintf(fpsmsg, "%.1f", (double)boopcount / ((double)da / FCEUD_GetTimeFreq())); |
| 769 | |
| 770 | boopcount = 0; |
| 771 | boop_ts = ts; |
| 772 | } |
| 773 | boopcount++; |
| 774 | |
| 775 | DrawTextTrans(XBuf + ((256 - ClipSidesOffset) - 40) + (FSettings.FirstSLine + 4) * 256, 256, (uint8*)fpsmsg, 0xA0); |
| 776 | } |
| 777 | |
| 778 | bool showPauseCountDown = true; |
| 779 |
no test coverage detected