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 Sep 10, 2022
1 parent 3958eb6 commit 57118d3
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 @@ -518,7 +518,8 @@ namespace spades {

#ifndef __sun
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 57118d3

Please sign in to comment.