Add timers and ability to set a target fps for the application (#36)

* working on windows

* minor fix

* working on macosx

* Oops! I reversed resolution and frequency on macos

* working on X11

* working on wayland

* update the readme

* format the readme

Co-authored-by: Carlos Aragones <>
This commit is contained in:
Carlos Aragonés
2020-04-22 13:00:15 +02:00
committed by GitHub
parent 4175cec89e
commit 35b8439b26
19 changed files with 734 additions and 239 deletions

View File

@ -110,13 +110,11 @@ main()
mfb_set_user_data(window, (void *) "Input Events CPP Test");
for (;;)
{
do {
int i;
mfb_update_state state;
for (i = 0; i < WIDTH * HEIGHT; ++i)
{
for (i = 0; i < WIDTH * HEIGHT; ++i) {
noise = seed;
noise >>= 3;
noise ^= seed;
@ -133,7 +131,7 @@ main()
window = 0x0;
break;
}
}
} while(mfb_wait_sync(window));
return 0;
}