mach: wasm: add note about vsync support and move VSyncMode to enums.zig

This commit is contained in:
iddev5 2022-05-24 23:41:19 +05:30 committed by Stephen Gutekanst
parent 488131ecbb
commit 8d9ca11b45
3 changed files with 25 additions and 19 deletions

View file

@ -106,6 +106,8 @@ export fn wasmInit() void {
var gpa = std.heap.GeneralPurposeAllocator(.{}){};
const allocator = gpa.allocator();
// NOTE: On wasm, vsync is double by default and cannot be changed.
// Hence options.vsync is not used anywhere.
const options = if (@hasDecl(App, "options")) App.options else structs.Options{};
engine = Engine.init(allocator, options) catch unreachable;