core: x11: clarify X11 multi-threading (#1297)

This commit is contained in:
Ronald M Zielaznicki 2024-11-09 18:36:12 +00:00 committed by GitHub
parent 06f61044fb
commit 2608e1313c
Failed to generate hash of commit
2 changed files with 10 additions and 19 deletions

View file

@ -265,7 +265,11 @@ fn init(core: *Mod, entities: *mach.Entities.Mod) !void {
.format = .bgra8_unorm,
.width = @intCast(state.platform.size.width),
.height = @intCast(state.platform.size.height),
.present_mode = .mailbox,
.present_mode = switch (state.platform.vsync_mode) {
.none => .immediate,
.double => .fifo,
.triple => .mailbox,
},
};
state.swap_chain = state.device.createSwapChain(state.surface, &state.descriptor);