Skip to content

Commit

Permalink
perf(gui): reduce the number of ItemHandle method invocations (yvt#…
Browse files Browse the repository at this point in the history
  • Loading branch information
devnexen authored and siecvi committed Sep 30, 2022
1 parent b5d28a8 commit 1ecb86c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Sources/Gui/SDLRunner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,8 @@ namespace spades {
Handle<client::IAudioDevice> audio(CreateAudioDevice(), false);

if (rtype == RendererType::GL) {
if (r_vsync != 0 && SDL_GL_SetSwapInterval(r_vsync) != 0)
int vsync = r_vsync;
if (vsync != 0 && SDL_GL_SetSwapInterval(vsync) != 0)
SPRaise("SDL_GL_SetSwapInterval failed: %s", SDL_GetError());
}

Expand Down

0 comments on commit 1ecb86c

Please sign in to comment.