mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-23 01:59:43 +01:00
Add v-sync hint
This is because otherwise, on my Linux system at least, the game will take up a lot of CPU that it doesn't really need to (I only have a 60hz monitor). On Windows, it looks like Windows already enforces V-sync for applications anyway, unless they have exclusive fullscreen control. Linux doesn't enforce V-sync on apps and lets them take up as much CPU as they want, so I'm putting this here to limit the framerate. The game is already actually 30 FPS anyway, the nice smooth FPS is just visual. V-sync won't introduce any more "input lag" than already exists.
This commit is contained in:
parent
ad6adcb3c0
commit
4be18ff9fe
1 changed files with 2 additions and 0 deletions
|
@ -108,6 +108,8 @@ int main(int argc, char *argv[])
|
|||
}
|
||||
}
|
||||
|
||||
SDL_SetHintWithPriority(SDL_HINT_RENDER_VSYNC, "1", SDL_HINT_OVERRIDE);
|
||||
|
||||
if(!FILESYSTEM_init(argv[0], baseDir, assetsPath))
|
||||
{
|
||||
return 1;
|
||||
|
|
Loading…
Reference in a new issue