mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-30 18:04:09 +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:
@@ -605,11 +605,12 @@ static void menuactionpress(void)
|
||||
game.savestatsandsettings_menu();
|
||||
break;
|
||||
case 5:
|
||||
/* FIXME: Upgrade to SDL 2.0.18 and remove this ifdef when it releases! */
|
||||
#if SDL_VERSION_ATLEAST(2, 0, 17)
|
||||
//toggle vsync
|
||||
music.playef(11);
|
||||
#ifndef __HAIKU__ // FIXME: Remove after SDL VSync bug is fixed! -flibit
|
||||
graphics.screenbuffer->vsync = !graphics.screenbuffer->vsync;
|
||||
graphics.screenbuffer->resetRendererWorkaround();
|
||||
graphics.screenbuffer->toggleVSync();
|
||||
game.savestatsandsettings_menu();
|
||||
#endif
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user