Skip to content

Commit

Permalink
Enable triple buffer for hardware scaling modes only if configured.
Browse files Browse the repository at this point in the history
  • Loading branch information
plrguez committed Aug 11, 2021
1 parent e5206d4 commit 5968618
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/sdl-dingux/sdl_video.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1991,10 +1991,11 @@ int VideoInit()
}
}

flags = (options.vsync ? (SDL_HWSURFACE | SDL_TRIPLEBUF) : (SDL_HWSURFACE));
if (options.rotate == 1 || options.rotate == 3) {
screen = SDL_SetVideoMode(VideoBufferHeight, VideoBufferWidth, 16, SDL_HWSURFACE | SDL_TRIPLEBUF);
screen = SDL_SetVideoMode(VideoBufferHeight, VideoBufferWidth, 16, flags);
} else {
screen = SDL_SetVideoMode(VideoBufferWidth, VideoBufferHeight, 16, SDL_HWSURFACE | SDL_TRIPLEBUF);
screen = SDL_SetVideoMode(VideoBufferWidth, VideoBufferHeight, 16, flags);
}

} else {
Expand Down

0 comments on commit 5968618

Please sign in to comment.