diff options
| author | SND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2009-06-16 07:03:18 +0000 |
|---|---|---|
| committer | SND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2009-06-16 07:03:18 +0000 |
| commit | bdaffda275f3ae92860a7ab0c23ad5574fac665e (patch) | |
| tree | aac7824ab4e980ba888c4f38400b40a70bed38a9 /plugins/dfOpenGL/fps.c | |
| parent | 447f8fae234c8a99f1cba5cfd20bff2a0df0895b (diff) | |
| download | pcsxr-bdaffda275f3ae92860a7ab0c23ad5574fac665e.tar.gz | |
removed dfOpenGL, peopsxgl is now only built with --enable-opengl specified
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@23712 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'plugins/dfOpenGL/fps.c')
| -rw-r--r-- | plugins/dfOpenGL/fps.c | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/plugins/dfOpenGL/fps.c b/plugins/dfOpenGL/fps.c deleted file mode 100644 index 21f95c7f..00000000 --- a/plugins/dfOpenGL/fps.c +++ /dev/null @@ -1,41 +0,0 @@ -#include <sys/time.h> -#include <unistd.h> -#include "gpu_i.h" - -static const double NTSC = 100000000/5994; -static const double PAL = 100000000/5000; - -static double lastvsync = 0; -#define FRAMESAMPLES 10 - -double GetTime() //in microseconds -{ - struct timeval tv; - gettimeofday(&tv, 0); // well, maybe there are better ways - return (double)tv.tv_sec * 1000000 + tv.tv_usec; // to do that, but at least it works -} - -void waitforrealtime() -{ - double currenttime,tickstogo; - double target; - - currenttime = GetTime(); - - if (currenttime < lastvsync + 1000000) - target = lastvsync + (psxDisp.pal ? PAL : NTSC); - else - target = currenttime; - - lastvsync = target; - - while (currenttime < target) - { - tickstogo = target - currenttime; - if (tickstogo >= 500.0f) - { - usleep((useconds_t)tickstogo-200); //usleep in microseconds - } - currenttime = GetTime(); - } -} |
