Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void cpu_save()
- {
- static int past, present = ::SDL_GetTicks();
- past = present;
- present = ::SDL_GetTicks();
- int wait = FRAME_RATE - (present - past);
- cout << wait << endl;
- if (wait < 0 || wait > FRAME_RATE) wait = 0;
- ::SDL_Delay(wait);
- }
Add Comment
Please, Sign In to add comment