100 fps OpenBSD SDL2 build
Brought to you by:
acceptthis,
timeserv
Building an SDL2 build on OpenBSD, fteqw was getting 100 fps. Sys_Sleep(0) calls SDL_Delay(0), which causes it to sleep anyways. This limits OpenBSD to 100 FPS due to its 100 tick kernel.
I resolved this issue with this patch and now get 600+ fps. It is similar to sys_linux.c.
$OpenBSD$
Index: engine/client/sys_sdl.c
--- engine/client/sys_sdl.c.orig
+++ engine/client/sys_sdl.c
@@ -677,7 +677,8 @@ int QDECL main(int argc, char **argv)
sleeptime = Host_Frame (time);
oldtime = newtime;
- Sys_Sleep(sleeptime);
+ if (sleeptime)
+ Sys_Sleep(sleeptime);
}
}
Fix similar to this was merged a few years ago, so closing this old issue
Moved to https://github.com/fte-team/fteqw/issues/58