From 62005b90b4627081971c5c007fe4e8040e80c6cf Mon Sep 17 00:00:00 2001 From: sam-astro <77079540+sam-astro@users.noreply.github.com> Date: Thu, 13 Jan 2022 10:12:12 -0500 Subject: [PATCH] VSync --- Slang/graphics.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Slang/graphics.h b/Slang/graphics.h index 3914c70..1c5c903 100644 --- a/Slang/graphics.h +++ b/Slang/graphics.h @@ -733,7 +733,7 @@ int initGraphics(std::string windowTitle, int width, int height) TTF_Init(); gWindow = SDL_CreateWindow(windowTitle.c_str(), 40, 40, WINDOW_WIDTH, WINDOW_HEIGHT, SDL_WINDOW_SHOWN); - gRenderer = SDL_CreateRenderer(gWindow, -1, 0, SDL_RENDERER_ACCELERATED); + gRenderer = SDL_CreateRenderer(gWindow, -1, 0, SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC); //Get window surface gScreenSurface = SDL_GetWindowSurface(gWindow);