aboutsummaryrefslogtreecommitdiff
path: root/plugins/dfxvideo
diff options
context:
space:
mode:
authornotaz2010-11-19 19:22:13 +0200
committernotaz2010-11-19 19:22:13 +0200
commit14dffdb7a0457fc647103deafa5f1cac12e888fb (patch)
treedb0b1a22f9beaaf535ebab0e0fda6d795055d3a4 /plugins/dfxvideo
parentb60f2812208aa36dc8b9e8e90f02b608dafd0c00 (diff)
downloadpcsx_rearmed-14dffdb7a0457fc647103deafa5f1cac12e888fb.tar.gz
pcsx_rearmed-14dffdb7a0457fc647103deafa5f1cac12e888fb.tar.bz2
pcsx_rearmed-14dffdb7a0457fc647103deafa5f1cac12e888fb.zip
basic profiling
Diffstat (limited to 'plugins/dfxvideo')
-rw-r--r--plugins/dfxvideo/draw_fb.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/plugins/dfxvideo/draw_fb.c b/plugins/dfxvideo/draw_fb.c
index 39be291..ce3f515 100644
--- a/plugins/dfxvideo/draw_fb.c
+++ b/plugins/dfxvideo/draw_fb.c
@@ -64,9 +64,11 @@ static void blit(void)
static int fbw, fbh, fb24bpp;
+#include "pcnt.h"
+
void DoBufferSwap(void)
{
- static float fps_old;
+ static int fps_counter;
if (PSXDisplay.DisplayMode.x == 0 || PSXDisplay.DisplayMode.y == 0)
return;
@@ -78,13 +80,18 @@ void DoBufferSwap(void)
pl_fbdev_set_mode(fbw, fbh, fb24bpp ? 24 : 16);
}
- if (fps_cur != fps_old) {
- printf("%2.1f\n", fps_cur);
- fps_old = fps_cur;
- }
-
blit();
pl_fbdev_flip();
+
+ pcnt_end(PCNT_ALL);
+
+ if (++fps_counter == 60/6) {
+ //printf("%2.1f\n", fps_cur);
+ pcnt_print(fps_cur);
+ fps_counter = 0;
+ }
+
+ pcnt_start(PCNT_ALL);
}
void DoClearScreenBuffer(void) // CLEAR DX BUFFER
@@ -128,6 +135,7 @@ void CloseDisplay(void)
{
CloseMenu();
pl_fbdev_finish();
+ //WriteConfig();
}
void CreatePic(unsigned char * pMem)