mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-30 01:48:15 +03:00
Fix VSync renderer workaround
SDL just got an API to toggle VSync without having to tear down the renderer ( libsdl-org/SDL#4157 ). We can remove the workaround and use that instead. For now, we are putting it behind an ifdef until SDL 2.0.18 officially releases in November. Fixes #831.
This commit is contained in:
@@ -370,10 +370,12 @@ static void menurender(void)
|
||||
break;
|
||||
case 5:
|
||||
graphics.bigprint(-1, 30, "Toggle VSync", tr, tg, tb, true);
|
||||
#ifdef __HAIKU__ // FIXME: Remove after SDL VSync bug is fixed! -flibit
|
||||
graphics.Print(-1, 65, "Edit the config file on Haiku!", tr, tg, tb, true);
|
||||
#else
|
||||
/* FIXME: Upgrade to SDL 2.0.18 and remove this ifdef when it releases! */
|
||||
#if SDL_VERSION_ATLEAST(2, 0, 17)
|
||||
graphics.Print(-1, 65, "Turn VSync on or off.", tr, tg, tb, true);
|
||||
#else
|
||||
graphics.Print(-1, 65, "Your SDL version is too old!", tr, tg, tb, true);
|
||||
graphics.Print(-1, 75, "Edit the config file.", tr, tg, tb, true);
|
||||
#endif
|
||||
|
||||
if (!graphics.screenbuffer->vsync)
|
||||
|
||||
Reference in New Issue
Block a user