[client] reduce weight of FPS limiter feedback

This commit is contained in:
Geoffrey McRae 2018-05-25 08:35:52 +10:00
parent 5de9a8dce6
commit 62e67c345c

View file

@ -66,7 +66,7 @@ struct AppState
int shmFD;
struct KVMFRHeader * shm;
unsigned int shmSize;
unsigned int fpsSleep;
int64_t fpsSleep;
};
typedef struct RenderOpts
@ -199,7 +199,9 @@ int renderThread(void * unused)
{
usleep(state.fpsSleep - total);
int64_t delta = (1000000 / params.fpsLimit) - (microtime() - start);
state.fpsSleep += delta;
state.fpsSleep += delta / 16;
if (state.fpsSleep < 0)
state.fpsSleep = 0;
}
}
else