mach: correct vsync mode setting
This correctly sets presentation modes for vsync, both at startup and at runtime via a `setOptions` request. Note: There may still be platforms where setting vsync is not enough, and a frame rate limiter is needed to achieve proper synchronization. This is tracked in hexops/mach#444 and not fixed by this change. Fixes hexops/mach#307 Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
edc3b5d60e
commit
eb0eceb707
3 changed files with 19 additions and 11 deletions
|
|
@ -286,7 +286,7 @@ export fn wasmInit() void {
|
|||
var gpa = std.heap.GeneralPurposeAllocator(.{}){};
|
||||
const allocator = gpa.allocator();
|
||||
|
||||
core = Core.init(allocator) catch unreachable;
|
||||
Core.init(allocator, &core) catch unreachable;
|
||||
app.init(&core) catch {};
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue