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:
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user