mach: wasm: implement getWindowSize
This commit is contained in:
parent
f7301cc242
commit
281b1e75c0
1 changed files with 5 additions and 1 deletions
|
|
@ -40,7 +40,11 @@ pub const CoreWasm = struct {
|
||||||
|
|
||||||
pub fn setShouldClose(_: *CoreWasm, _: bool) void {}
|
pub fn setShouldClose(_: *CoreWasm, _: bool) void {}
|
||||||
|
|
||||||
pub fn getFramebufferSize(core: *CoreWasm) !structs.Size {
|
pub fn getFramebufferSize(_: *CoreWasm) !structs.Size {
|
||||||
|
return structs.Size{ .width = 0, .height = 0 };
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn getWindowSize(core: *CoreWasm) !structs.Size {
|
||||||
return structs.Size{
|
return structs.Size{
|
||||||
.width = js.machCanvasGetWidth(core.id),
|
.width = js.machCanvasGetWidth(core.id),
|
||||||
.height = js.machCanvasGetHeight(core.id),
|
.height = js.machCanvasGetHeight(core.id),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue