Added SetFPS() and SetWindowVSync()

This commit is contained in:
n00b
2024-12-20 20:40:10 -05:00
parent 8b8be85dea
commit 94a9bb08fb
15 changed files with 1754 additions and 1698 deletions

View File

@@ -79,11 +79,11 @@ void rc_preUpdate()
bool rc_update()
{
if(rc_window_vsync)
if(rc_window_setfps)
{
int frame_delay = 1000/rc_vsync_refresh_rate;
while( (SDL_GetTicks()-rc_vsync_timer) < frame_delay ){}
rc_vsync_timer = SDL_GetTicks();
int frame_delay = 1000/rc_setfps_refresh_rate;
while( (SDL_GetTicks()-rc_setfps_timer) < frame_delay ){}
rc_setfps_timer = SDL_GetTicks();
}
if(!device->run())