[nostalgia/core/sdl] Add tracepoint about vsync/adaptive vsync setting

This commit is contained in:
Gary Talent 2021-03-18 19:10:20 -05:00
parent bfca2193bc
commit 736b9342ea

View File

@ -30,6 +30,7 @@ ox::Error run(Context *ctx) {
auto id = ctx->windowerData<SdlImplData>();
// try adaptive vsync
if (SDL_GL_SetSwapInterval(-1) < 0) {
oxTrace("nostalgia::core::sdl", "Could not enable adaptive vsync, falling back on vsync");
SDL_GL_SetSwapInterval(1); // fallback on normal vsync
}
for (auto running = true; running;) {